So I just want to make a simple mod that copies the LP tithe behavior to the pirates. Just using the same LPTitheCalc in the Somehow I got it working initially (sort of) but then it stopped working, and now I can't get it working again. Not even the initial setup. Seriously? What condition isn't being met?
Test scenario: I start a new game, console command spawnfleet pirates 10. Your newgame rep with pirates is already 68 which is Hostile, so it should be fine and match the conditions.
Attached is the whole mod file. Note I didn't really read the rules.csv documentation, I don't know java, don't understand fundamental concepts of starsector modding, etc. Thanks!
Here is the rules csv file.
(Man having to work with csv is really awkward. Even TSV would be more text editor friendly. But having to use some spreadsheet editor and mess around with the size of the cels and not have grep/regex, just in order to not look at a jumble of linebreaks is a real drag.)
Here's the rules.csv file in mod/data/campaign/rules.csv
id,trigger,conditions,script,text,options,notes
#pirate bribe paying,,,,,,
PirateBribeCheck,BeginFleetEncounter,"$faction.id == pirates score:100
RepIsAtWorst $faction.id HOSTILE
!Pirate_bribePaid
!Pirate_bribeAskedFor
$relativeStrength >= 0
LPTitheCalc","Pirate_bribeConv = true 0
Pirate_bribeAskedFor = true 7
AddText ""You're being hailed by the $faction $otherShipOrFleet."" $faction.baseColor",,,
PirateBribePre,OpenCommLink,$entity.Pirate_bribeConv score:100,"SetTextHighlights $entity.LP_tithe
$entity.ignorePlayerCommRequests = true 1","""Submit and repent! Your use of sinful technologies may be forgiven, for a tithe of $entity.LP_tithe credits.
Resist, and only God's holy vacuum will show you mercy.""
OR
""Servant of Moloch! Redemption is not out of reach even for you. A tithe of $entity.LP_tithe credits may set you upon the first step of the Path of Ludd.""
""Forswear this pennance and be met with annihilation, cursed by Ludd in the next life. The choice is yours.""","payBribe:Pay the tithe
cutCommLink:Cut the comm link",
PirateBribePay,DialogOptionSelected,$option == payBribe,"AddText ""Lost $entity.LP_tithe credits"" textEnemyColor
SubCredits $entity.LP_tithe
$entity.Pirate_bribePaid = true 30
MakeOtherFleetNonHostilePirate_bribe true 30
AddText ""\""Blessings of Ludd be upon you.\""""
AddText ""The connection is cut before you have a chance to respond.""
ShowDefaultVisual
EndConversation","""Perhaps your soul is not yet lost to the machine.""
OR
""Truly, Ludd's hand has guided you.""",cutCommLink:Cut the comm link,
[attachment deleted by admin]