[Closed] Bug: Domina power recharge time resets

These are old bug reports that have been closed.
Locked
SpongeJr
Miner
Miner
Posts: 37
Joined: Tue Dec 14, 2010 6:35 am
Location: (objGetPos gPlayerShip)

It seems that if you "Save and Quit" and Continue your game that the "recharge" time for your Domina powers isn't saved, so you have to wait allll over again for your powers to come back. It is reproducable. Seems to happen every time for me. Just set your Domina level to >1 and try it.

This MAY be "working as intended", but I don't think so... when you save your game, I'd imagine the whole "game state" should be saved?
I'm working on new sounds for Transcendence. Check out what I have so far: http://xelerus.de/index.php?s=mod&id=825
(still a work in progress, but it does work!)
User avatar
Aury
Fleet Admiral
Fleet Admiral
Posts: 5421
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

This is a bug, likely resulting from the attempt to fix the issue of them not working when the universe timer was too low.
(shpOrder gPlayership 'barrelRoll)
(plySetGenome gPlayer (list 'Varalyn 'nonBinary))
Homelab Servers: Xeon Silver 4110, 16GB | Via Quadcore C4650, 16GB | Athlon 200GE, 8GB | i7 7800X, 32GB | Threadripper 1950X, 32GB | Atom x5 8350, 4GB | Opteron 8174, 16GB | Xeon E5 2620 v3, 8GB | 2x Xeon Silver 4116, 96GB, 2x 1080ti | i7 8700, 32GB, 6500XT
Workstations & Render machines: Threadripper 3990X, 128GB, 6900XT | Threadripper 2990WX, 32GB, 1080ti | Xeon Platinum 8173M, 48GB, 1070ti | R9 3900X, 16GB, Vega64 | 2x E5 2430L v2, 24GB, 970 | R7 3700X, 32GB, A6000
Gaming Systems: R9 5950X, 32GB, 6700XT
Office Systems: Xeon 5318Y, 256GB, A4000
Misc Systems: R5 3500U, 20GB | R5 2400G, 16GB | i5 7640X, 16GB, Vega56 | E5 2620, 8GB, R5 260 | P4 1.8ghz, 0.75GB, Voodoo 5 5500 | Athlon 64 x2 4400+, 1.5GB, FX 5800 Ultra | Pentium D 3.2ghz, 4GB, 7600gt | Celeron g460, 8GB, 730gt | 2x Athlon FX 74, 8GB, 8800gts 512 | FX 9590, 16GB, R9 295x2 | E350, 8GB | Phenom X4 2.6ghz, 16GB, 8800gt | random core2 duo/atom/i5/i7 laptops
Jeoshua
Militia Lieutenant
Militia Lieutenant
Posts: 163
Joined: Sat Sep 06, 2008 3:48 pm

Actually, in the scripts I've noticed that global variables are deleted once their code section does... namely when the game closes. Maybe this is related, maybe not... but Domina does use alot of script.
Bobby
Militia Captain
Militia Captain
Posts: 675
Joined: Wed Jul 25, 2007 7:39 pm

Specifically in the case of domina powers unvGetTick resets every time the game is saved and restarted.
ImageImage
Thanks to digdug for the banners.
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

this would be a good thing for the official T patch to fix. We should have a list where we could add pending fixes
User avatar
Ttech
Fleet Admiral
Fleet Admiral
Posts: 2767
Joined: Tue Nov 06, 2007 12:03 am
Location: Traveling in the TARDIS
Contact:

alterecco wrote:this would be a good thing for the official T patch to fix. We should have a list where we could add pending fixes

We could use something like google code, Github (it supports SVN) and or we can use trac. Those would suffice.
Image
Image
SpongeJr
Miner
Miner
Posts: 37
Joined: Tue Dec 14, 2010 6:35 am
Location: (objGetPos gPlayerShip)

This quick little bit of code is my workaround for the unvGetTick / Domina powers & tithing bug:

Code: Select all

<Invoke>
<!-- This is a temporary solution. Very inelegant. -->
(block nil
	(if (typGetGlobalData 0x00202001 "lastInvokeTime1") (typSetGlobalData 0x00202001 "lastInvokeTime1" 180))
	(if (typGetGlobalData 0x00202001 "lastInvokeTime2") (typSetGlobalData 0x00202001 "lastInvokeTime2" 180))
	(if (typGetGlobalData 0x00202001 "lastInvokeTime3") (typSetGlobalData 0x00202001 "lastInvokeTime3" 180))
	(if (typGetGlobalData 0x00202001 "lastInvokeTime4") (typSetGlobalData 0x00202001 "lastInvokeTime4" 180))
	(if (typGetGlobalData 0x00202001 "lastInvokeTime5") (typSetGlobalData 0x00202001 "lastInvokeTime5" 180))
	(if (typGetGlobalData 0x00202001 "lastInvokeTime6") (typSetGlobalData 0x00202001 "lastInvokeTime6" 180))
	(objSetData gPlayerShip "sistersLastDonation" (60))
	(plyMessage gplayer (cat "Domina powers reset. Your Domina XP is currently: " (typGetGlobalData 0x00202001 "xp")))
)
</Invoke>
This code, when added to an item, does the following when the item is <U>sed:

- Set the "last invoke time" for each of the Domina powers of levels 1-6 to 180 "ticks" (a few seconds after game start)
- Set the "last donation time" for Sisters of Domina tithing to 60 ticks (two seconds after game start)
- Send a message to the player indicating that powers have been reset and also revealing their current Domina XP.

Notes:
- Yes, I should have used a loop. Initially I just tried level 1 powers and I copy/pasted from that instead of rewriting the code.
- Tithing @ Sisters of Domina temple is affected by unvGetTick, hence why it is reset also.
- If you don't understand Domina XP and levels, revealing that info might be a minor spoiler for you.
- You could use this code to cheat and have basically perpetually usable Domina powers with no "cooldown". I thought about ways to make it fair but decided that was way too much effort for my own uses since I know I would never use it to cheat. If you cheat with it, it's your conscience, not mine. I also heard that Domina doesn't like cheaters.
- I stuck this code in a ROM biosoft that doesn't go away when you use it, and then edited the playerships to have the ROM right from the start of the game. I called it "Domina Bugfix ROM" and gave it basically no other value. If you do something like this, be warned that you could still lose the item to, e.g., solvent flooding your cargo hold.
- I also stuck the code into the Jewel of Contemplation item 'cuz I thought that would be neat.
- The code provided here is in the Public Domain. You can use it, steal it, modify it, print it out, wear it on a t-shirt, whatever you want. No credit to me is necessary.

- Oh yeah, almost forgot. I hardcoded the 0x00202001 ID instead of using the global variable. That's not good. There's a constant set for it in Transcendence.xml I think, something like &stDomina. I had the number memorized but not the variable name. Anyway, that's bad practice, don't do it.
I'm working on new sounds for Transcendence. Check out what I have so far: http://xelerus.de/index.php?s=mod&id=825
(still a work in progress, but it does work!)
Bobby
Militia Captain
Militia Captain
Posts: 675
Joined: Wed Jul 25, 2007 7:39 pm

I made a fix for this bug too, you can find it on xelerus here. It works by:

1. replacing unvGetTick with unvGetTickDom for the context of domina.xml, reading a stored variable instead of the resetting unvGetTick.

Code: Select all

        (setq unvGetTickDom (lambda Nil
            (block (ticks)
                (setq ticks (typGetGlobalData &stDomina; "ticks"))
                ticks
            )
        ))
2. Code placed in the latest captain's log (CL) will check if this mod is installed and increment the variable used in step one. It's in CL because That's the first convenient universal recurring event I could think of (and when the bug is properly fixed no new stations have been added so this can be removed during a game), but it could be put anywhere, perhaps an item.

Code: Select all

        (if (not (isError (unvGetTickDom)))
            (block (ticks domticks newticks)
                (if (isError  (setq domticks (typGetGlobalData &stDomina; "ticks")))
                    (typSetGlobalData &stDomina; "ticks" 0)
                (typSetGlobalData &stDomina; "ticks" (add domticks 150)))
            )
        )
note that on each running of this event the counter is incremented by 150, which is the length of the delay on this event, so adjust it accordingly.


the result is a transparent solution (assuming you already have CL) that works as originally intended, or at least close to it.
ImageImage
Thanks to digdug for the banners.
SpongeJr
Miner
Miner
Posts: 37
Joined: Tue Dec 14, 2010 6:35 am
Location: (objGetPos gPlayerShip)

Bobby, author of that cool Captain's Log mod, arranged some bytes thusly:
I made a fix for this bug too, you can find it on xelerus ...
Sweet. A very nice solution indeed. I'm a fan of CL but I'm doing a plain Vanilla playthrough (well... Vanilla + SpongeJr's Variety Sounds and SpongeJr's Variety Text mods... but they don't count :P ) so I can't try this out for myself yet. It certainly looks like a better solution than my clunky code though. Good work.
I'm working on new sounds for Transcendence. Check out what I have so far: http://xelerus.de/index.php?s=mod&id=825
(still a work in progress, but it does work!)
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

The very pretentiously named, but apparently legit Official Patch mod now also carries this fix (and not much else yet)
User avatar
Aury
Fleet Admiral
Fleet Admiral
Posts: 5421
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

Well, I wouldn't consider that its pretentiously named when it was originally named "Unofficial" like all the other mods like it for all those other games, until it was made official, so the name was changed >.> :roll:

But yeah, its rather incomplete ATM. :lol:
(shpOrder gPlayership 'barrelRoll)
(plySetGenome gPlayer (list 'Varalyn 'nonBinary))
Homelab Servers: Xeon Silver 4110, 16GB | Via Quadcore C4650, 16GB | Athlon 200GE, 8GB | i7 7800X, 32GB | Threadripper 1950X, 32GB | Atom x5 8350, 4GB | Opteron 8174, 16GB | Xeon E5 2620 v3, 8GB | 2x Xeon Silver 4116, 96GB, 2x 1080ti | i7 8700, 32GB, 6500XT
Workstations & Render machines: Threadripper 3990X, 128GB, 6900XT | Threadripper 2990WX, 32GB, 1080ti | Xeon Platinum 8173M, 48GB, 1070ti | R9 3900X, 16GB, Vega64 | 2x E5 2430L v2, 24GB, 970 | R7 3700X, 32GB, A6000
Gaming Systems: R9 5950X, 32GB, 6700XT
Office Systems: Xeon 5318Y, 256GB, A4000
Misc Systems: R5 3500U, 20GB | R5 2400G, 16GB | i5 7640X, 16GB, Vega56 | E5 2620, 8GB, R5 260 | P4 1.8ghz, 0.75GB, Voodoo 5 5500 | Athlon 64 x2 4400+, 1.5GB, FX 5800 Ultra | Pentium D 3.2ghz, 4GB, 7600gt | Celeron g460, 8GB, 730gt | 2x Athlon FX 74, 8GB, 8800gts 512 | FX 9590, 16GB, R9 295x2 | E350, 8GB | Phenom X4 2.6ghz, 16GB, 8800gt | random core2 duo/atom/i5/i7 laptops
Locked