Jedi State

duffstone

Member
Joined
Sep 13, 2013
Messages
188
is there not an organic way of changing the jedi state of a player without modifying the core?

I did this 2 years ago, but it entailed some heavy core3 modding to make it work.  I know the villiage and hologrind systems are in place, but I don't see any way that can translate that into a simple  (or complex) screenplay.  it seems to be it's own manager / system with copious code in the core.

I can award skills, which can / will have modifiers with them. so certs, skill mods, abilities, etc... can all be handled organically without changing the core.  Basically you just change skills.iff.  but I don't see a way to modify the jedi state without specifically going through the jedi manager.  OR...  modifying the core...

I can change the core easily and effectively... I even have the code I used last time which appears to likely work if I plug it back in.  but I'm trying to keep my changes all to "modish" flavoring this go around.  I don't want to touch the core yet until I'm sure I have no other choice.

-Duff
 

duffstone

Member
Joined
Sep 13, 2013
Messages
188
Ok, let me start by adding some color & background:

1) What I'm trying to do is to add the original Jedi Tree's (5 total, 1 padawan tree, 2 light tree's, 2 dark tree's). I don't care about any play outside of those, meaning no FRS, no jedi advancement tree, etc... I've made novice padawan cost 250 SP so you can't make jedi a hybrid. it's all or nothing. it's also free and available to all... No unlock, just train the novice like you would any other starter prof...

2) I had all of the above working properly using a 2013 core3 version. I had to modify significant swath's of core3's code to make it work, as back then most jedi stuff didn't really work right. I mothballed the project cause the core wasn't ready for what I wanted to do next, nor were my C++ skills. so now, let's fast forward to today...

3) the core has matured to the point where 99% of what I want to do is available without modifying the actual core. however, with my jedi system, there's a few oddities I didn't expect. First, most force powers / skills won't work without a jediState set to 1 or higher. Secondly, you can't tune a crystal without having the "force_title_jedi_rank_01" skill trained. Both are hard-coded into core3, and I haven't found a way to bypass them using LUA or existing managers.

what further complicates matters, is that you can't simply train "force_title_jedi_rank_01". I've tried using the /grantskill from in game, I've tried using a trainer, I've tried using the jedi manager... no dice. you simply can't train it. from what I've read on SWGEMU's forums, the villiage system does work to create jedi... so either they've seeded core3 with an untrainable skill to prevent people from playing jedi, or they're somehow trapping the call and won't let it train. either way I cannot find it.

4) Ultimately I created a new jedi manager that still sets your jedi state to 8, and trains the "force_title_jedi_rank_01" skill at every login. I then had to break down and modify / recompile the core to remove this errant value for tuning crystals and equipping robes. so I'm now working 100% with jedi.

Well, 100% of whatever is currently working today. :) I'm sure there's still some skills not working properly. but the system / trainers / intro quests are in and working as intended.

-Duff

P.S. the point of this was to say if you want to award skills & change the jedi state, it can be done by creating a custom jedi manager. It's detailed above, but I didn't include a summary.
 

Phoenix

Moderator
Staff member
Moderator
Joined
Sep 25, 2010
Messages
235
You could have went to LightsaberCrystalComponentImplementation.cpp and editted

void LightsaberCrystalComponentImplementation::fillObjectMenuResponse(ObjectMenuResponse* menuResponse, CreatureObject* player) {

if ((owner == "") && player->hasSkill("force_title_jedi_rank_01") && hasPlayerAsParent(player)) {
String text = "@jedi_spam:tune_crystal";
menuResponse->addRadialMenuItem(128, 3, text);
}

ComponentImplementation::fillObjectMenuResponse(menuResponse, player);
}

int LightsaberCrystalComponentImplementation::handleObjectMenuSelect(CreatureObject* player, byte selectedID) {

if (selectedID == 128 && player->hasSkill("force_title_jedi_rank_01") && hasPlayerAsParent(player)) {
if(owner == "") {
ManagedReference<SuiMessageBox*> suiMessageBox = new SuiMessageBox(player, SuiWindowType::TUNE_CRYSTAL);

suiMessageBox->setPromptTitle("@jedi_spam:confirm_tune_title");
suiMessageBox->setPromptText("@jedi_spam:confirm_tune_prompt");
suiMessageBox->setCancelButton(true, "Cancel");
suiMessageBox->setUsingObject(_this.get());
suiMessageBox->setCallback(new LightsaberCrystalTuneSuiCallback(player->getZoneServer()));

player->getPlayerObject()->addSuiBox(suiMessageBox);
player->sendMessage(suiMessageBox->generateMessage());
} else {
player->sendSystemMessage("This crystal has already been tuned.");
}
}

return 0;
}
 
Top Bottom