saving soveriegn dispositions

Freeform discussion about anything related to modding Transcendence.
Post Reply
muffildy
Anarchist
Anarchist
Posts: 19
Joined: Fri Jul 15, 2011 1:16 am

http://paste.neurohack.com/view/YyT4k/

Hello,
i am trying to make a device that temporarily makes you neutral to everyone, but the temporary part is the problem - i cant seem to get the device to revert back to the old faction standings.
help would be appreciated.
shanejfilomena
Fleet Officer
Fleet Officer
Posts: 1533
Joined: Tue Mar 22, 2011 8:43 pm
Location: Alaska
Contact:

that is actually too technical for my tiny self: I would have done it simpler .
there is almost always a simple way to do it: cheap but effective.
Last edited by shanejfilomena on Fri Jul 22, 2011 5:33 pm, edited 1 time in total.
Flying Irresponsibly In Eridani......

I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

You would need to go through all the sovereigns you are changing and get their initial disposition towards the player. Use sovGetDisposition for this.

I would recommend that you do not hardcode any of the sovereigns (to work with mods). Here some functions that might work for you, that loop over all sovereigns, stores their initial disposition and neutralizes their disposition towards the player and the reverse.

Code: Select all

(setq neutralizeSovereigns (lambda nil
  (block nil
    ;; loop over all sovereigns
    (enum (typFind "v") sov
      (block nil
        ;; save initial disposition on the type
        (typSetGlobalData sov "InitialDisposition" (sovGetDisposition sov &svPlayer;))
        ;; neutralize sov
        (sovSetDisposition sov &svPlayer; "neutral")
      )
    )
  )
))

(setq resetSovereigns (lambda nil
  (block nil
    ;; loop over all sovereigns
    (enum (typFind "v") sov
      (block (disp)
        (if (setq disp (typGetGlobalData sov "InitialDisposition"))
          ;; reset disposition
          (sovSetDisposition sov &svPlayer; disp)
        )
      )
    )
  )
))
Get your own Galactic Omni Device
Get it now. It's free!!
Image
Post Reply