AxlDave Posted April 1, 2014 Share Posted April 1, 2014 SO I have a piece of armour that alters reputation all over the Mojave. Trouble is, I can't get it to work. The script saves, so it must make sense, and the script is linked to the armour. I can't see why it doesn't work, but it doesn't. As in, nothing changes. Here's the script, it's quite long but fairly simple: scn RepScript short DoOnceBEGIN OnEquip Player if ( DoOnce == 0 ) || ( DoOnce == 2 ) if ( Player.GetAV Karma >= 250 ) Player.AddReputation RepNVFreeside 1 100 Player.AddReputation RepNVGoodsprings 1 100 Player.AddReputation RepNVNovac 1 100 Player.AddReputation RepNVPrimm 1 100 Player.AddReputation RepNVTheStrip 1 100 Player.AddReputation RepNVBoomer 1 25 Player.AddReputation RepNVGreatKhans 1 25 Player.AddReputation RepNVPowderGanger 1 0 Player.AddReputation RepNVWhiteGloveSociety 1 25 Player.AddReputation RepNVFollowers 1 50 Player.AddReputation RepNVBrotherhood 1 50 Player.AddReputation RepNVNCR 1 50 Player.AddReputation RepNVCaesarsLegion 1 -100 Player.AddReputation RepNVFreeside 0 0 Player.AddReputation RepNVGoodsprings 0 0 Player.AddReputation RepNVNovac 0 0 Player.AddReputation RepNVPrimm 0 0 Player.AddReputation RepNVTheStrip 0 0 Player.AddReputation RepNVBoomer 0 25 Player.AddReputation RepNVGreatKhans 0 25 Player.AddReputation RepNVPowderGanger 0 50 Player.AddReputation RepNVWhiteGloveSociety 0 50 Player.AddReputation RepNVFollowers 0 0 Player.AddReputation RepNVBrotherhood 0 50 Player.AddReputation RepNVNCR 0 25 Player.AddReputation RepNVCaesarsLegion 0 100 set DoOnce to 1 ShowMessage AXL1 endif endif if ( DoOnce == 0 ) || ( DoOnce == 1 ) if ( Player.GetAV Karma <= -250 ) Player.AddReputation RepNVFreeside 1 0 Player.AddReputation RepNVGoodsprings 1 0 Player.AddReputation RepNVNovac 1 0 Player.AddReputation RepNVPrimm 1 0 Player.AddReputation RepNVTheStrip 1 0 Player.AddReputation RepNVBoomer 1 25 Player.AddReputation RepNVGreatKhans 1 25 Player.AddReputation RepNVPowderGanger 1 75 Player.AddReputation RepNVWhiteGloveSociety 1 50 Player.AddReputation RepNVFollowers 1 0 Player.AddReputation RepNVBrotherhood 1 0 Player.AddReputation RepNVNCR 1 0 Player.AddReputation RepNVCaesarsLegion 1 100 Player.AddReputation RepNVFreeside 0 100 Player.AddReputation RepNVGoodsprings 0 100 Player.AddReputation RepNVNovac 0 100 Player.AddReputation RepNVPrimm 0 100 Player.AddReputation RepNVTheStrip 0 100 Player.AddReputation RepNVBoomer 0 25 Player.AddReputation RepNVGreatKhans 0 25 Player.AddReputation RepNVPowderGanger 0 0 Player.AddReputation RepNVWhiteGloveSociety 0 25 Player.AddReputation RepNVFollowers 0 50 Player.AddReputation RepNVBrotherhood 0 50 Player.AddReputation RepNVNCR 0 75 Player.AddReputation RepNVCaesarsLegion 0 -100 set DoOnce to 2 ShowMessage AXL2 endif endifENDBEGIN OnUnequip Player set DoOnce to 0END Any ideas why reputation won't budge a smegging inch? Or why Message 1 will show up with good karma, but when karma drops below -250, I have to unequip and re-equip the armour in order to get Message 2? It works like that both ways, if I have bad karma it will show Message 2, but not Message 1 until re-equipped. Link to comment Share on other sites More sharing options...
jazzisparis Posted April 2, 2014 Share Posted April 2, 2014 See this page. When using AddReputation, you need to use values from 1 to 5 as the amount. For exact values, use AddReputationExact. For negative values, use RemoveReputation or RemoveReputationExact.Moreover, there is no need to specify a calling reference in any of the above. Link to comment Share on other sites More sharing options...
AxlDave Posted April 2, 2014 Author Share Posted April 2, 2014 Ah I see, cheers for that man. So to clarify, each line can be AddReputationExact instead of Player.AddReputationExact? Link to comment Share on other sites More sharing options...
AxlDave Posted April 2, 2014 Author Share Posted April 2, 2014 I still have the problem whereby reputation only alters upon unequipping and re-equipping the armour. What happens is, I wear the armour with Karma = 0. I then raise my Karma to 250, but nothing changes. If I then take off the armour and put it back on, suddenly reputation changes. Every time I want reputation to change, it involves taking off and putting back on the outfit. I thought the script would make the change immediately on detection of the Karma level, but it apparently requires DoOnce to be reset to 0. I'm not sure why, any ideas? Link to comment Share on other sites More sharing options...
jazzisparis Posted April 2, 2014 Share Posted April 2, 2014 Just as their names suggest, the OnEquip and OnUnequip blocks only run once, when the scripted object is equipped/unequipped. If you want the script to continuously monitor the player's karma while the armour is equipped, you will need to use a GameMode block: scn RepScript short DoOnce begin GameMode if GetContainer != player elseif player.GetEquipped ArmorEditorID (The rest of the script goes here) endif end Link to comment Share on other sites More sharing options...
AxlDave Posted April 2, 2014 Author Share Posted April 2, 2014 Ach, of course, thanks again. Link to comment Share on other sites More sharing options...
AxlDave Posted April 3, 2014 Author Share Posted April 3, 2014 One last question, is there any way to modify reputation without the message coming up? Usually, it's just a case of sticking a 0 in the script line, such as "Player.AddItem AnItem 1 0". However "AddReputationExact RepNVFreeside 1 25 0" does not save, so clearly that's not it. Link to comment Share on other sites More sharing options...
Recommended Posts