Creating Pre Pub 9 style or Choice Jedi

Dec 8, 2011
132
0
16
#1
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_trials:padawan_trials_title"); // Jedi Trials
                                                box->setPromptText("@jedi_trials:padawan_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 :D

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.
 
Dec 8, 2011
132
0
16
#2
Notes on the bugs/limitations I mentioned.
First, when you open your skills in came, Control+K, you have the force progression, which doesn't match well with the pre-pub 9 system.

2. There is a bug in i think the hologrind_jedi_manager.lua file that I don't know how to fix, where once you use a holo it tells you ALL the profs to unlock instead of one. I also dont know if the silent one works either.

3. Once you unlock with the hologrind system as above you still cannot meditate at the Force Shrine until you log out. It's another weird bug where it doesnt award force_title_jedi_novice or force_title_jedi_rank_01 until you first log out. Once you log back in your fine.

Lastly, although it is a pre pub 9 style Jedi they really aren't IMO very Alpha, based on my current skills.iff at least. It's basically a Jedi who gets all the Jedi skills from all templates but this is in no way as powerful as say changing the skill requirements to allow a Village system with all the Jedi boxes trainable. For instance way less force or force regain etc.
 

Ambrus

New Member
Jun 8, 2016
1
0
0
#4
"3. Once you unlock with the hologrind system as above you still cannot meditate at the Force Shrine until you log out.  It's another weird bug where it doesnt award force_title_jedi_novice or force_title_jedi_rank_01 until you first log out.  Once you log back in your fine. "


You know I'm wondering if the Force Shrine bug is actually a bug. Didn't the pre-pub 9 system unlock a new character slot on your account and then you had to log in as the new "force sensitive" character to start your Jedi?

I'm thinking the system might still think that you are unlocking a new character slot and you have to disconnect and reconnect as the character you want to be Jedi.
 
Dec 8, 2011
132
0
16
#5
Ambrus said:
"3. Once you unlock with the hologrind system as above you still cannot meditate at the Force Shrine until you log out.  It's another weird bug where it doesnt award force_title_jedi_novice or force_title_jedi_rank_01 until you first log out.  Once you log back in your fine. "


You know I'm wondering if the Force Shrine bug is actually a bug. Didn't the pre-pub 9 system unlock a new character slot on your account and then you had to log in as the new "force sensitive" character to start your Jedi?

I'm thinking the system might still think that you are unlocking a new character slot and you have to disconnect and reconnect as the character you want to be Jedi.
I'm not sure.  I wasn't around for that system unfortunately, which is prob why I was so obsessed with trying to get it working here lol.

What I did notice though is if you inspect the player with the /server playerinfo command before they train the final box and after both look identical; don't show the force sensitive change. If it's working as intended then I would love for someone to show me how I can change so you don't need to log out.
 
Dec 8, 2011
132
0
16
#7
I noticed some files have been updated by swgemu that will impact this. I'll try and hook up with u this weekend but rl is crazy atm.
 

Pake

Member
Dec 8, 2011
132
0
16
#9
c0pp3r said:
Hey there. Any update on how to do this in the latest core3 version?
Time permitting I will try and take a look this weekend.  I remember seeing the changes and thinking that it shouldn't be difficult to re-figure out.  Basically, it was all about awarding the right skills.  Tak was going to be working on something similar for Choice.  If he hasn't gotten far I may be able to help take some of that off his plat so he can focus on creating super-awesome planets :D

So what aspect were you most interested in (to give me an idea of where to focus my time)?  Pre-9 style Jedi, Holocron unlock, etc.?
 

c0pp3r

New Member
Aug 19, 2016
9
1
1
#10
Pake said:
c0pp3r said:
Hey there. Any update on how to do this in the latest core3 version?
Time permitting I will try and take a look this weekend.  I remember seeing the changes and thinking that it shouldn't be difficult to re-figure out.  Basically, it was all about awarding the right skills.  Tak was going to be working on something similar for Choice.  If he hasn't gotten far I may be able to help take some of that off his plat so he can focus on creating super-awesome planets :D

So what aspect were you most interested in (to give me an idea of where to focus my time)?  Pre-9 style Jedi, Holocron unlock, etc.?
Pre-pub 9 trees for sure. Screenplays are new to me also so I'm going to dabble in that but not sure what unlock method I want. I guess it will likely be more holocron than village though. 

I started messing with this tonight and ran into 2 issues:
1. The Shrine is in lua now and is not equipped for you to swap to holocron unlock without adding more functionality. If you unlock via holocron and get JediState(1) and Force Sensitive the shrine won't talk to you because of paddy trial stuff they are working on. 

Edit : problem 2 resolved by your skills.iff
 

Pake

Member
Dec 8, 2011
132
0
16
#11
The whole issue concerning the holocron unlock and using the Force Shrine shouldn't have been an issue, since you could just award whatever skill you needed in the hologrind_jedi_manager.lua or changed the required skill check in the ForceShrineMenuComponent.lua, though you shouldn't have to since the hologrind_jedi_manager.lua also awards force_title_jedi_novice, which is what the ForceShrineMenuComponent.lua checks for.  

Unfortunately, I forgot the the hologrind unlock file never worked as intended after the change.  After much difficulty trying to figure this out I remembered helping someone else last year with the hologrind unlock after the changes.  After comparing the new file with an older version I had saved I identified a few lines the SWGEmu team removed from the file that when put back in made it work.  I'll post a link here as soon as I figure out how to work Google Drive/sign up for a free account.  Since you just want the pre pub 9 Jedi just find and comment out the line awardSkill(pCreatureObject, "force_title_jedi_novice")

In your ForceShrineMenuComponent.lua replace the entire function function ForceShrineMenuComponent:fillObjectMenuResponse(pSceneObject, pMenuResponse, pPlayer)

with the one below:


function ForceShrineMenuComponent:fillObjectMenuResponse(pSceneObject, pMenuResponse, pPlayer)
    local menuResponse = LuaObjectMenuResponse(pMenuResponse)
    menuResponse:addRadialMenuItem(120, 3, "@jedi_trials:meditate") -- Meditate
    menuResponse:addRadialMenuItem(121, 3, "@force_rank:recover_jedi_items") -- Recover Jedi Items
end

Since you wont have the Village Jedi skills you will not be able to equip the robes.  If you would like to change the requirements in object/tangible/wearables/robe/robe_jedi_padawan.lua

Lastly, make the change in step 2 at the start of the guide above then rebuild your server.  Should be good to go then.

I believe this is the link to download that hologrind_jedi_manager.lua.
 

Pake

Member
Dec 8, 2011
132
0
16
#12
Edited:

Also forgot 3 things.

1., in the ForceShrineMenuComponent.lua replace the whole  function ForceShrineMenuComponent:doMeditate(pObject, pPlayer) with the below:

function ForceShrineMenuComponent:doMeditate(pObject, pPlayer)

    local rand = getRandomNumber(1, 15)
    local genericMessage = "@jedi_trials:force_shrine_wisdom_" .. rand
    local isJediPadawan = CreatureObject(pPlayer):hasSkill("force_title_jedi_rank_02")
    local isJediKnight = CreatureObject(pPlayer):hasSkill("force_title_jedi_rank_03")
    local currentTrial = tonumber(readScreenPlayData(pPlayer, "JediPadawanTrial", "CurrentTrial"))
    local knightAvailable = CreatureObject(pPlayer):villageKnightPrereqsMet("")

    local pGhost = CreatureObject(pPlayer):getPlayerObject()

    if (not isJediPadawan) then
        -- Unlock Padawan
        self:unlockJediPadawan(pPlayer)
    end
end

2., You will have to edit your skills.iff file to remove the pre-req I placed for Novice paddy and add certification for the training saber.  Go to the line for jedi_padawan_novice and in the column SKILLS_REQUIRED delete the entry.  Then put cert_onehandlightsaber_training in the COMMANDS column.  Remember, this file has to be server-side and client-side, following Step 5.

3., I had to make a bunch of changes to LightsaberCrystalComponmentImplementation.cpp in order to allow for tuning crystals.
 

Pake

Member
Dec 8, 2011
132
0
16
#13
I was also able to fix the bug where when you used 1 holocron it told you all the processions to unlock. I could share the 'how to" if there's interest but I already made huge changes to that file.
 

c0pp3r

New Member
Aug 19, 2016
9
1
1
#14
hehe I did the same thing. Here is the change. The "break" is new:



Code:
if not playerObject:hasBadge(professions[i]) then
 					local professionText = self:getProfessionStringIdFromBadgeNumber(professions[i])
Add a comment to this line
 					creatureObject:sendSystemMessageWithTO("@jedi_spam:holocron_light_information", "@skl_n:" .. professionText)
					break
 				end
 			end
 		end)
 
Likes: veaseomat

Pake

Member
Dec 8, 2011
132
0
16
#15
I never knew lua had break. That would have been a lot cleaner lol.

one more thing to be mindful of, the current lightsaber files on the server will give Jedi XP, so you will want to change them to the appropriate XP type or each one (or no one will be able to advance).
 

c0pp3r

New Member
Aug 19, 2016
9
1
1
#16
So I was tweaking stuff and I'm still having some issues in the unlock with it granting the proper stuff for the shrine to give me access.

Here is my function:
function HologrindJediManager:awardJediStatusAndSkill(pCreatureObject)
ObjectManager.withCreaturePlayerObject(pCreatureObject, function(playerObject)
awardSkill(pCreatureObject, "force_title_jedi_novice")
playerObject:setJediState(1)
end)
end

I am not seeing force_title_jedi_novice successfully appear under my skills after I unlock and I'm not entirely sure why. I've tried moving around the setJediState to set it before the awardskill but that didn't seem to change anything
 

c0pp3r

New Member
Aug 19, 2016
9
1
1
#17
I re read your post about it not working correctly and think I need to implement exactly what you said. I will do that and see where I end up. Thanks
 

c0pp3r

New Member
Aug 19, 2016
9
1
1
#18
So I felt that not using the force progression tree was going to cause some issues so instead I figured out how to hack this out so it would work. It isn't pretty but I'll go over it in detail if someone wants

The keys are you need to change how SkillManager.cpp checks to ensure you have the rights to learn force skills, I moved it from looking at the canLearnSkill in the jedi_manager.lua to just check your Jedi state. I also had to change the granting of skills by lua to send true true true instead of true false true because they were not working in the DirectorManager.lua
 
Dec 8, 2011
132
0
16
#19
If you weren't going to use the village you should be able to still use the force progression tree but hide it. There's a column in the skills.iff file that is labeled something like show_skill or similar. Just tick that off (or on?) and it should be invisible to the client but function normally.
 
Jan 16, 2015
92
5
8
41
#20
c0pp3r said:
So I felt that not using the force progression tree was going to cause some issues so instead I figured out how to hack this out so it would work. It isn't pretty but I'll go over it in detail if someone wants

The keys are you need to change how SkillManager.cpp checks to ensure you have the rights to learn force skills, I moved it from looking at the canLearnSkill in the jedi_manager.lua to just check your Jedi state. I also had to change the granting of skills by lua to send true true true instead of true false true because they were not working in the DirectorManager.lua
Did you manage to get the force_title_rank_01 to be given on completion of the hologrind? if so can you let me know what you changed to get it to work?

Thank you