skills.iff file link
After finally figuring out how to get a pre publish 9 style Jedi system, then having everything change and having to re-discover how to make it work again I thought I would share my notes so others can create similar systems.
Although I went with a hologrind style unlock and originally focused on pre pub 9 style this guide will allow you to (with some limitation) create either a Jedi system that is similar to pub 9 or one that allows the player to choose between the pre and post 9 style of play. That said there exists some limitations with skills display I will get into later. Most of this guide will focus on the server-side changes though you will need to edit the skills.iff file.
For starters you will need SIE - to edit skills.iff
Server-Side
1. This step is in case you do not intend to use the Village's Force Sensitive skills as an initial requirement. If you intend your players to first get the required Force Sensitive skills than you can skip this step. Or, if you wish to change the amount of boxes required than simply make that change as outlined below.
In the file workspace/MMOCoreORB/src/server/zone/managers/skill/ open SkillsManager.cpp and search for the instances where there is a check for force sensitive skill counts. Change the 24 to 0 (this will change the requirement to have 24 Force Sensitive boxes before the Jedi Trainer will talk to you to 0 [or however many you desire]. Example:
SkillList* skillList = creature->getSkillList();
if(skillName == "force_title_jedi_novice" && getForceSensitiveSkillCount(creature, true) > 0) {
return false;
}
There will be at least a few instances similar to the above that will need to be changed. If you do not do this change you can’t even grant the skills unless the character has the minimum number of Force Sensitive branches completed.
2. Next, go to /home/vagrant/workspace/MMOCoreORB/src/server/zone/objects/creature/conversation/screenhandlers/ and open the file TrainerScreenHandlers.cpp. Find the location of the below code [excluding the bolded parts]. Replace the the skills in the " " in String jedi1 = from 1 through 5 with the bolded text, though if you want the choice system simply add in the bolded text below. Do the same for the session->addAdditionalMasterSkill parts in the next chunck.
Vector3 playerCoord = ghost->getTrainerCoordinates();
Vector3 player(playerCoord.getX(), playerCoord.getY(), 0);
if ((npc == player) && (ghost->getTrainerZoneName() == conversingNPC->getZone()->getZoneName())) {
String jedi1 = "force_discipline_light_saber_master";
String jedi2 = "force_discipline_defender_master";
String jedi3 = "force_discipline_powers_master";
String jedi4 = "force_discipline_enhancements_master";
String jedi5 = "force_discipline_healing_master";
String jedi6 = "jedi_padawan_master";
String jedi7 = "jedi_light_side_journeyman_master";
String jedi8 = "jedi_light_side_master_master";
String jedi9 = "jedi_dark_side_journeyman_master";
String jedi10 = "jedi_dark_side_master_master";
session->addAdditionalMasterSkill(jedi1);
session->addAdditionalMasterSkill(jedi2);
session->addAdditionalMasterSkill(jedi3);
session->addAdditionalMasterSkill(jedi4);
session->addAdditionalMasterSkill(jedi5);
session->addAdditionalMasterSkill(jedi6);
session->addAdditionalMasterSkill(jedi7);
session->addAdditionalMasterSkill(jedi8);
session->addAdditionalMasterSkill(jedi9);
session->addAdditionalMasterSkill(jedi10);
}
3. The Unlock. If you are going to use the Village unlock than you can skip this step. I chose to use a hologrind unlock, which is easy for testing but still bugged as the holocron doesn't fully work and I currently don't know how to fix that
In either case you will need to update the skills awarded upon completion of whatever unlock you choose to be in line with the appropriate SKILLS_REQUIRED column in the datatables/skill/skills.iff file. As I went with the hologrind I will include those steps.
A). go to /workspace/MMOCoreORB/bin/scripts/managers/jedi/ and first open the jedi_manager.lua file.
A). go to /workspace/MMOCoreORB/bin/scripts/managers/jedi/ and first open the jedi_manager.lua file. Find the line jediProgressionType = VILLAGEJEDIPROGRESSION and change it to jediProgressionType = HOLOGRINDJEDIPROGRESSION then save and close.
B). In the same folder open the hologrind_jedi_manager.lua file. Here set the number of professions required for unlock and the badges that will be used to randomly pull from. Of importance: update the below function to award the skills bolded or the next step (Force Shrine) might notwork.
function HologrindJediManager:awardJediStatusAndSkill(pCreatureObject)
ObjectManager.withCreaturePlayerObject(pCreatureObject, function(playerObject)
awardSkill(pCreatureObject, "force_title_jedi_novice")
awardSkill(pCreatureObject, "force_title_jedi_rank_01")
playerObject:setJediState(1)
end)
end
C). Updating the Force Shrine. Go to workspace/MMOCoreORB/src/server/zone/objects/tangible/components/ and open the ForceShrineMenuComponent.cpp file. Find he below code and verify that it awards force_title_jedi_rank_02 and sets the proper Jedi state [setJediState(2)]. It should like like below:
if (!creature->hasSkill("force_title_jedi_rank_02")) {
ManagedReference<SuiMessageBox*> box = new SuiMessageBox(creature, SuiWindowType::NONE);
box->setPromptTitle("@jedi_trialsadawan_trials_title"); // Jedi Trials
box->setPromptText("@jedi_trialsadawan_trials_completed");
ghost->addSuiBox(box);
creature->sendMessage(box->generateMessage());
SkillManager::instance()->awardSkill("force_title_jedi_rank_02", creature, true, true, true);
creature->playEffect("clienteffect/trap_electric_01.cef", "");
PlayMusicMessage* pmm = new PlayMusicMessage("sound/music_become_jedi.snd");
creature->sendMessage(pmm);
ghost->setJediState(2);
A note, there is a bug in this file concerning the /findmytrainer command. Need fixed this bug but it wasn't pushed yet. See http://www.swgemu.com/bugs/view.php?id=7009
4. Update the skills.iff file and place it in the server. First, update the file. There is actually a lot to do here so I will make mine available once I figure out how to use MEGA (unless anyone wants to host it for me I will happily email it). Basically, the first thing you need to do is make the old Jedi skills visible. Starting at jedi_padawan_novice follow the IS_HIDDEN column and un-tick all the Jedi skills. Then go back to the jedi_padawan_novice row and change the POINTS_REQUIRED to 249 and set the SKILLS_REQUIRED as force_title_jedi_rank_02.
Next, go to the XP_TYPE column and change all the required xp for the pre-9 Jedi to jedi_general. Note: if anyone could figure out for me how to make lightsabers award 2 types of xp than I would love to change these requirements.
Next, go to the rows for jedi_dark_side_journeyman_novice and jedi_light_side_journeyman_novice and set the POINTS_REQUIRED to 1 (this is what will force players to choose light or dark and not both).
Other issues that need to be addressed with this file include 1). changing all the skills as some of them are different pre pub 9 and post, 2). adding in the missing commands from post 9, 3). adjusting to the new private_jedi etc skills [this is similar to 1). but was such a big deal I felt worth mentioning again].
5. Pack your skills.iff file into a tre file and add it to your server, or simply add the file itself. If you create a new tre file remember to update that file into your config.lua file. Or, in workspace/MMOCoreORB/bin you can create a folder 'datatables' then inside that one create a folder 'skill' and inside it place the skills.iff file.
6. Recompile/build your server and restart then you're done
Client Side
Not much to be done here. Either add in the new tre file, being sure to amend your swgemu_live.cfg file to include the new tre file or in the same location as the tre files create folder 'datatables' then inside that one create a folder 'skill' and inside it place the skills.iff file.
After finally figuring out how to get a pre publish 9 style Jedi system, then having everything change and having to re-discover how to make it work again I thought I would share my notes so others can create similar systems.
Although I went with a hologrind style unlock and originally focused on pre pub 9 style this guide will allow you to (with some limitation) create either a Jedi system that is similar to pub 9 or one that allows the player to choose between the pre and post 9 style of play. That said there exists some limitations with skills display I will get into later. Most of this guide will focus on the server-side changes though you will need to edit the skills.iff file.
For starters you will need SIE - to edit skills.iff
Server-Side
1. This step is in case you do not intend to use the Village's Force Sensitive skills as an initial requirement. If you intend your players to first get the required Force Sensitive skills than you can skip this step. Or, if you wish to change the amount of boxes required than simply make that change as outlined below.
In the file workspace/MMOCoreORB/src/server/zone/managers/skill/ open SkillsManager.cpp and search for the instances where there is a check for force sensitive skill counts. Change the 24 to 0 (this will change the requirement to have 24 Force Sensitive boxes before the Jedi Trainer will talk to you to 0 [or however many you desire]. Example:
SkillList* skillList = creature->getSkillList();
if(skillName == "force_title_jedi_novice" && getForceSensitiveSkillCount(creature, true) > 0) {
return false;
}
There will be at least a few instances similar to the above that will need to be changed. If you do not do this change you can’t even grant the skills unless the character has the minimum number of Force Sensitive branches completed.
2. Next, go to /home/vagrant/workspace/MMOCoreORB/src/server/zone/objects/creature/conversation/screenhandlers/ and open the file TrainerScreenHandlers.cpp. Find the location of the below code [excluding the bolded parts]. Replace the the skills in the " " in String jedi1 = from 1 through 5 with the bolded text, though if you want the choice system simply add in the bolded text below. Do the same for the session->addAdditionalMasterSkill parts in the next chunck.
Vector3 playerCoord = ghost->getTrainerCoordinates();
Vector3 player(playerCoord.getX(), playerCoord.getY(), 0);
if ((npc == player) && (ghost->getTrainerZoneName() == conversingNPC->getZone()->getZoneName())) {
String jedi1 = "force_discipline_light_saber_master";
String jedi2 = "force_discipline_defender_master";
String jedi3 = "force_discipline_powers_master";
String jedi4 = "force_discipline_enhancements_master";
String jedi5 = "force_discipline_healing_master";
String jedi6 = "jedi_padawan_master";
String jedi7 = "jedi_light_side_journeyman_master";
String jedi8 = "jedi_light_side_master_master";
String jedi9 = "jedi_dark_side_journeyman_master";
String jedi10 = "jedi_dark_side_master_master";
session->addAdditionalMasterSkill(jedi1);
session->addAdditionalMasterSkill(jedi2);
session->addAdditionalMasterSkill(jedi3);
session->addAdditionalMasterSkill(jedi4);
session->addAdditionalMasterSkill(jedi5);
session->addAdditionalMasterSkill(jedi6);
session->addAdditionalMasterSkill(jedi7);
session->addAdditionalMasterSkill(jedi8);
session->addAdditionalMasterSkill(jedi9);
session->addAdditionalMasterSkill(jedi10);
}
3. The Unlock. If you are going to use the Village unlock than you can skip this step. I chose to use a hologrind unlock, which is easy for testing but still bugged as the holocron doesn't fully work and I currently don't know how to fix that
In either case you will need to update the skills awarded upon completion of whatever unlock you choose to be in line with the appropriate SKILLS_REQUIRED column in the datatables/skill/skills.iff file. As I went with the hologrind I will include those steps.
A). go to /workspace/MMOCoreORB/bin/scripts/managers/jedi/ and first open the jedi_manager.lua file.
A). go to /workspace/MMOCoreORB/bin/scripts/managers/jedi/ and first open the jedi_manager.lua file. Find the line jediProgressionType = VILLAGEJEDIPROGRESSION and change it to jediProgressionType = HOLOGRINDJEDIPROGRESSION then save and close.
B). In the same folder open the hologrind_jedi_manager.lua file. Here set the number of professions required for unlock and the badges that will be used to randomly pull from. Of importance: update the below function to award the skills bolded or the next step (Force Shrine) might notwork.
function HologrindJediManager:awardJediStatusAndSkill(pCreatureObject)
ObjectManager.withCreaturePlayerObject(pCreatureObject, function(playerObject)
awardSkill(pCreatureObject, "force_title_jedi_novice")
awardSkill(pCreatureObject, "force_title_jedi_rank_01")
playerObject:setJediState(1)
end)
end
C). Updating the Force Shrine. Go to workspace/MMOCoreORB/src/server/zone/objects/tangible/components/ and open the ForceShrineMenuComponent.cpp file. Find he below code and verify that it awards force_title_jedi_rank_02 and sets the proper Jedi state [setJediState(2)]. It should like like below:
if (!creature->hasSkill("force_title_jedi_rank_02")) {
ManagedReference<SuiMessageBox*> box = new SuiMessageBox(creature, SuiWindowType::NONE);
box->setPromptTitle("@jedi_trialsadawan_trials_title"); // Jedi Trials
box->setPromptText("@jedi_trialsadawan_trials_completed");
ghost->addSuiBox(box);
creature->sendMessage(box->generateMessage());
SkillManager::instance()->awardSkill("force_title_jedi_rank_02", creature, true, true, true);
creature->playEffect("clienteffect/trap_electric_01.cef", "");
PlayMusicMessage* pmm = new PlayMusicMessage("sound/music_become_jedi.snd");
creature->sendMessage(pmm);
ghost->setJediState(2);
A note, there is a bug in this file concerning the /findmytrainer command. Need fixed this bug but it wasn't pushed yet. See http://www.swgemu.com/bugs/view.php?id=7009
4. Update the skills.iff file and place it in the server. First, update the file. There is actually a lot to do here so I will make mine available once I figure out how to use MEGA (unless anyone wants to host it for me I will happily email it). Basically, the first thing you need to do is make the old Jedi skills visible. Starting at jedi_padawan_novice follow the IS_HIDDEN column and un-tick all the Jedi skills. Then go back to the jedi_padawan_novice row and change the POINTS_REQUIRED to 249 and set the SKILLS_REQUIRED as force_title_jedi_rank_02.
Next, go to the XP_TYPE column and change all the required xp for the pre-9 Jedi to jedi_general. Note: if anyone could figure out for me how to make lightsabers award 2 types of xp than I would love to change these requirements.
Next, go to the rows for jedi_dark_side_journeyman_novice and jedi_light_side_journeyman_novice and set the POINTS_REQUIRED to 1 (this is what will force players to choose light or dark and not both).
Other issues that need to be addressed with this file include 1). changing all the skills as some of them are different pre pub 9 and post, 2). adding in the missing commands from post 9, 3). adjusting to the new private_jedi etc skills [this is similar to 1). but was such a big deal I felt worth mentioning again].
5. Pack your skills.iff file into a tre file and add it to your server, or simply add the file itself. If you create a new tre file remember to update that file into your config.lua file. Or, in workspace/MMOCoreORB/bin you can create a folder 'datatables' then inside that one create a folder 'skill' and inside it place the skills.iff file.
6. Recompile/build your server and restart then you're done
Client Side
Not much to be done here. Either add in the new tre file, being sure to amend your swgemu_live.cfg file to include the new tre file or in the same location as the tre files create folder 'datatables' then inside that one create a folder 'skill' and inside it place the skills.iff file.