Logo Platform
logo amplifiers simplified

Modding Hissho Bushido bonus with the expansion

Copied to clipboard!
11 years ago
Jul 24, 2013, 5:27:38 PM
Hello everyone



I recently bought the Disharmony expansion ;



I'm tying to modify the Hissho Bushido bonus within it so that it gives you a bonus at first, but then gives a malus if you didn't get a new stack fast enough.



The idea behind it is that Hissho society gets involved in a massive war effort as long as they hve conquests, but starts crumbling into strife if there are no victories for a long time. Thus bushido bonus would give you a bonus at first, for about 15 turns, but would give you a malus then, for another 15 turns say. This way, you would have an obligation in order to keep your bonuses up and avoid maluses to continuously conquer new systems, so that you get new stacks which override the old ones before they turn from a bonus to a malus.



Something like 20% FID for each stack for 15 turns, but -5% FID for 15 turns afterwards.



The mechanism would be that each stack would give you, from the turn it is gained, a 25%FID bonus for 15 turn and a -5%FID malus for 30 turn. This way, each stack would effectively give you +20% FID for 15 turns and then -5% FID for the next 15 turns.



I'm believing that stacks work in such a way that if you already have 4 and get a new one, the oldest one is overwritten by the new one. In this way, the -5% malus on stacks could be avoided by continuously getting new wolrds conquered before the 15 turns timer runs out and only the malus remains.





In order to make this work, I have two questions :



-Could anyone confirm that stacks work the way I believe them to, and such a system would work?



-I found the values that govern Bushido bonuses types and quantities, but I can't find where the mechanism concerning the number and duration of stacks is written in the XML.



The quantities and types are in Empire Trait Descriptor :



























But I can't find the values for number, duration and generation of stacks. Are they related to something "WarBonusFromBushido" found in EmpireDescriptor ?



Anyway, can anyone tell me how it is possible to modify the bushido bonus stacks duration ?





Many thanks



Apylam
0Send private message
11 years ago
Jul 24, 2013, 7:38:07 PM
apylam wrote:


But I can't find the values for number, duration and generation of stacks. Are they related to something "WarBonusFromBushido" found in EmpireDescriptor ?



Anyway, can anyone tell me how it is possible to modify the bushido bonus stacks duration ?



It's in the the end of FactionTrait.xml



[CODE]



AffinityHisshoInvasionVictory

Accumulate;ResetTurns







AffinityHisshoBattleVictory

Accumulate;ResetTurns

[/CODE]



OccurrenceMaxCount is the max number of stacks.
0Send private message
11 years ago
Jul 24, 2013, 9:41:51 PM
Thanks you Vicarious .



I created a double of the AffinityHisshoInvasion victory trait, called AffinityHisshoInvasionMalus, and put it after AffinityHisshoInvasion ; it looks like this :





[CODE]



AffinityHisshoInvasionVictory

Accumulate;ResetTurns









AffinityHisshoInvasionVictoryMalus

Accumulate;ResetTurns

[/CODE]





Then I created a Descriptor in Empire trait descriptor that looks like this :





[CODE]







































[/CODE]







However, I'm not sure if this is going to work, as I'm not sure how the AffinityHissho affinity is going to apply the "AffinityHisshoInvasionVictoryMalus" trait for every battle won... I'm not sure how that aspect works.



The comments in faction traits say that theses temporary traits are , but I'm not really sure how that's checked, as I don't clearly see a line that refers to AffinityHissho ?
0Send private message
11 years ago
Jul 24, 2013, 11:11:44 PM
Have you tried it out?



Usually when the comment says something only applies when a certain condition is met that means the logic for the associated item is hardcoded. Chances are "AffinityHisshoInvasionVictory" only applies when a faction has trait AfinityHissho, but any duplicated trait with a different name would not. However, you can attach a subtrait section to "AffinityHisshoInvasionVictory" so that it activates another trait of your choice. For instance, look at the way tolerant trait works and you'll see how "SubTraits" work. I don't know that you can start a new trait after the last one ended, but you could apply two trait, one positive and one negative, and just have the negative last longer.
0Send private message
11 years ago
Aug 7, 2013, 11:06:24 AM
Ok, I finally got around to testing the modifications.



No dice however : I can't seem to make the secondary trait work. The maluses do not appear.



I wrote the modifications like this (additions are in bold):





In Empire trait descriptor :

[code]





























































[/code]



Note : the approval malus in HisshoinvasionvictoryMalus is only here for testing, to make it obvious when the maluses kick in, in case theses negative maluses for FIS were not displayed in the empire factors window along with the bonuses.



In faction Traits :

[code]







AffinityHisshoInvasionVictory

AffinityHisshoInvasionVictoryMalus

Accumulate;ResetTurns









AffinityHisshoInvasionVictoryMalus

Accumulate;ResetTurns









AffinityHisshoBattleVictory

Accumulate;ResetTurns



[/code]



And I added a line in EmpireDescriptor as HisshoinvasionVictory refers to it, in order to mimic it for HisshoivasionVictoryMalus, though I do not know what this line does :

[code]







[/code]





So, the modifications to the hissho affinity appear correctly (the bonuses are 25% and not 15%), but the maluses do not appear : I can't seem to make the sub trait system work. I tried something else (transforming the malus from a TraitOccasionalEffect to a Trait), but it made the game crash.



Can anyone help me? Do you see a way to make it work?



Thanks



apylam
0Send private message
11 years ago
Aug 7, 2013, 10:17:33 PM
"AffinityHisshoInvasionVictoryMalus" is most likely not a real property of ClassEmpire (unlike "AffinityHisshoInvasionVictory"). These properties are hardcoded so adding a line into ClassEmpire does not make it into a real property. With that said, the game code should have just ignored the lines you have there that referred to "AffinityHisshoInvasionVictoryMalus". I think the next step would be to remove those lines from the descriptor and ClassEmpire and see if that works.



If that does not work then I'm out of ideas..
0Send private message
11 years ago
Aug 8, 2013, 5:16:52 PM
I think the next step would be to remove those lines from the descriptor and ClassEmpire and see if that works.





I'm sorry, I do not understand how to remove to do it :



Do you mean that I should remove the part that says "type : AffinityHisshoInvasionVictoryMalus" since it will not be recognised by the game anyway?



What should I put as a descriptor type then? Should I just ley it blank, and the code would look like this :



[CODE]



















[/CODE]



I tried it and it doesn't seem to work. Can you tell me what I should do please?



Thanks



Apylam
0Send private message
11 years ago
Aug 8, 2013, 10:08:31 PM
[code]























[/code]



[code]







AffinityHisshoInvasionVictory

AffinityHisshoInvasionVictoryMalus

Accumulate;ResetTurns









AffinityHisshoInvasionVictoryMalus

Accumulate;ResetTurns



[/code]



ClassEmpire (essentially no change from stock):

[code]





[/code]



Like that. Pretty much removing all reference to "AffinityHisshoInvasionVictoryMalus" property. It is possible that since its not a real property, the game is not processing your descriptor correctly.
0Send private message
11 years ago
Aug 10, 2013, 10:49:54 AM
MMhh... It doesn't seem to work. I put the code as explained, and whenever I conquer a system only the modified Hisshoinvasion bonus triggers, not "invasionVictorymalus". I only see the modified positive effects from invasion victory in my empire factor list, and not the malus effects (no happiness malus either).

I have no idea why it isn't working or how to make it work.

Could it be because "subtraits" can't be used to give a traitoccasionaleffect?



Note : I'm trying this with a preexisting save game,, where the hissho affinity wasn't modified at the start of the game. However, the modified effects from HisshoInvasionVictory DO apply, so it doesn't seem to be a problem to work with a preexisting savegame.



Does anyone have any advice? I really don't know how to make it work here.



Apylam
0Send private message
11 years ago
Aug 10, 2013, 10:10:06 PM
apylam wrote:
Could it be because "subtraits" can't be used to give a traitoccasionaleffect?




That's what I'm thinking too. I'm out of ideas. Sorry I couldn't help more.
0Send private message
11 years ago
Aug 12, 2013, 9:32:54 PM
Well, too bad ; Thanks for your help anyway.



Is there a way to edit or append the hard-coded parts of the code? Or is it too complicated?



I'm thinking of something... If traits can't be used, maybe it is possible to use the special hissho technologies instead?

Like making it so the indoctrination parks (which give a permanent empire bonus while on bushido) also give you a permanent malus (something like -5% to FID) ans a corresponding bonus when bushido is active (or +10% FID). This way you're enticed to have bushido. However, this would only work when having the technology unlocked, and would give no incentive to develop it (unless the boni are superior to the mali).



Or, it would it be possible to develop something like this :

-a clone of the indoctrination parks tech, which give you a permanent -5 to FID at all times and +20 to FID while in Bushido

-then give this tech to the Hissho at the beginning of the game, via a race trait (that would cost 0 and be selectable at custom screens, or a sub trait of the Hissho afinity that would be automatically given?)





Apylam
0Send private message
11 years ago
Aug 13, 2013, 5:15:57 AM
apylam wrote:
Is there a way to edit or append the hard-coded parts of the code? Or is it too complicated?



I'm thinking of something... If traits can't be used, maybe it is possible to use the special hissho technologies instead?

Like making it so the indoctrination parks (which give a permanent empire bonus while on bushido) also give you a permanent malus (something like -5% to FID) ans a corresponding bonus when bushido is active (or +10% FID). This way you're enticed to have bushido. However, this would only work when having the technology unlocked, and would give no incentive to develop it (unless the boni are superior to the mali).




Well, if you can get into the executable, you'll be able to modify the hard code. Thought it wouldn't be mod at that point, more like a hack.



This idea of using technology is definitely work-able. You would probably implement it as descriptor activated by an empire improvement (can't remember if indoctrination parks was an empire improvement). I think its also possible to implement it as an event activated by a technology (which would give you a dialogue box) and have the descriptor be associated with the event. Although I'm not sure if an event descriptor can have infinite duration.



apylam wrote:
Or, it would it be possible to develop something like this :

-a clone of the indoctrination parks tech, which give you a permanent -5 to FID at all times and +20 to FID while in Bushido

-then give this tech to the Hissho at the beginning of the game, via a race trait (that would cost 0 and be selectable at custom screens, or a sub trait of the Hissho afinity that would be automatically given?)





This is also possible, you just add the tech to Hissho's list of unlock under "TraitUnlockingTechnoHissho".
0Send private message
?

Click here to login

Reply
Comment

Characters : 0
No results
0Send private message