unvSetExtensionData and consoles
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
I was trying to test out unvSetExtensionData using the transdata /run and it didn't work. Maybe we would have a general area where mods all can communicate and the console can get/set from that.
Crying is not a proper retort!
-
- Militia Captain
- Posts: 779
- Joined: Wed Nov 18, 2009 1:01 am
- Location: Still looking for the csc Antarctica
- Contact:
it didnt work because there is no Extension loaded (i would guess) but an area where everything can communicate is a good idea, maybe change the function to
(unvSetExtensionData extensionunid scope attrib data) and (unvGetExtensionData extensionunid scope attrib)
even tho that could cause issues and allow mods to screw other peoples data...
maybe a new local only command with above syntax will work
(unvSetExtensionData extensionunid scope attrib data) and (unvGetExtensionData extensionunid scope attrib)
even tho that could cause issues and allow mods to screw other peoples data...
maybe a new local only command with above syntax will work
"Dash_Merc - George is a genius, in that he created this game engine that is infinitely extendable"
"<@sheepluva>Good night everybody, may the source be with you." <-- FOSG dev
"You only need THREE tools in life - WD-40 to make things go, Duct Tape to make things stop And C-4 to make things go away"
-
- Developer
- Posts: 2997
- Joined: Thu Jul 24, 2003 9:53 pm
- Contact:
You're right. Unfortunately, TransData is does not currently handle storage (it doesn't load or save the Storage.xml file). If you can file a ticket for that, I believe I can fix it.Betelgeuse wrote:I was trying to test out unvSetExtensionData using the transdata /run and it didn't work. Maybe we would have a general area where mods all can communicate and the console can get/set from that.
As for a common storage, you can implement that on your own:
1. Create an extension with a <Globals> section. Something like:
Code: Select all
(setq betelsGlobalWrite (lambda (key value)
(unvSetExtensionData 'local key value)
))
(setq betelsGlobalRead (lambda (key value)
(unvGetExtensionData 'local key value)
))
-
- Fleet Admiral
- Posts: 2876
- Joined: Thu Feb 03, 2011 5:21 am
- Location: Hmm... I'm confused. Anybody have a starmap to the Core?
Just to clarify, I used this and it worked (instead of George's example for betelsGlobalRead ):
unvGetExtensionData probably shouldn't have the 2nd argument, but I don't know, I'm pretty new to this as well >.<
Code: Select all
(setq RPCGlobalWrite (lambda (key value)
(unvSetExtensionData 'local key value)
))
;(unvGetExtensionData scope attrib)
(setq RPCGlobalRead (lambda (key)
(unvGetExtensionData 'local key)
))
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
Get on Discord for mod help and general chat
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.