Time to wire - but where to start?

Help bring our custom Ages to life! Share tips and tricks, as well as code samples with other developers.

Re: Time to wire - but where to start?

Postby Sirius » Wed Apr 29, 2020 5:06 am

Tsar Hoikas wrote:Don't do this. Korman will export the text note "<agename>.sdl" for you.
[...]
plLogicModifier requests an exclusive lock from the server via plNetMsgTestAndSet before triggering. The delay between acquiring this lock and the trigger is the cause of many "fall through the floor" subworld bugs.

Once again, I wasn't aware of those two points, so thanks for the clarifications ! :) Cool that Korman already supports exporting SDLs. As for the server lock with the LogicModifier... I'm both glad it exists, but also impressed/worried by all those edge-cases Plasma/Age authors may or may not handle correctly. Networking is never an easy matter, especially when you start messing with custom Python scripts.


ametist wrote:Ok, so what you are saying is that if I export to URUoffline, which is URU:CC in my case, and I see any differences in the .py files in MOUL(which I have downloaded from this wiki) and URUoffline, I should use the x...py of the latter?

I would say you use both. Look at the "advanced logic" modifier - you can specify which node tree to use for which target version. This does require making two versions of the same node tree though, which will be nearly identical except for the Python script they use. (A bit annoying to setup and maintain, but hopefully not required in most cases when scripts are either identical or compatible.)


Chacal wrote:Also, using SDL allows the shard admin to set states manually, triggering changes for story purposes.

That, too.
IMHO SDL variables in general are a good standard, usually they are both limiting and powerful enough to railroad you in the "right" way of doing things.
I don't know how Cyan did at the time, but with the tools we have offline (Offline KI's SDL commands, deleting the SAV file, VaultShop etc) they are reasonably easy to work with.
User avatar
Sirius
 
Posts: 1372
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: Time to wire - but where to start?

Postby Tsar Hoikas » Wed Apr 29, 2020 9:07 am

Sirius wrote:impressed/worried by all those edge-cases Plasma/Age authors may or may not handle correctly. Networking is never an easy matter, especially when you start messing with custom Python scripts.

The engine does a pretty good job of protecting the artist from him/herself. There are of course still odd cases where things blow up, but I see that even in modern multimillion dollar commercial engines. Has anyone else noticed that UE4 likes to crash when you start getting fancy? Or my most recent favorite--pressing certain keys in a certain AAA video production software blows up the whole thing....
Image
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 2139
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

Re: Time to wire - but where to start?

Postby ametist » Fri May 01, 2020 8:27 am

I successfully created a SDL file, or Korman did it for me, just wrote it in the text editor. And just for testing, I built a little age with just a couple of cubes I wanted to show and hide, triggered by a sensor region. I think that is one thing I can test and see if things are correct. Triggering an animation will always happen with the nodetree anyway, so there I cant see if I have set the python nodes correct. Or?

One cube should be shown and one not at start, entering a region would trigger the nodetree with the python scripts to hide one and show the other. But they dont change state :( and I have tried with both tick and not ticking the 'boolShowOnTRue' for both of them.
Between every export I delete the .sav and the .dat files. Each cube has a nodetree attached with the xAgeBoolShowHide pythonfile, the region has the triggering nodetree. I can see the SDL file in the SDL folder of my URU:CC installation. I am so confused, what am I missing?
Attachments
ShowHide.jpg
ShowHide.jpg (73.31 KiB) Viewed 1131 times
SDLlearning.jpg
SDLlearning.jpg (25.15 KiB) Viewed 1131 times
blackhide.jpg
blackhide.jpg (37.29 KiB) Viewed 1131 times
User avatar
ametist
 
Posts: 354
Joined: Fri Dec 28, 2007 6:55 am

Re: Time to wire - but where to start?

Postby Tsar Hoikas » Fri May 01, 2020 1:23 pm

You're on the right track. I built a set of node trees that should do the job you want. Unfortunately, I cannot test them atm because the HDD all my Uru installs live on died and is presently being recovered. You may need to right click and "View Image" these screenshots because they potentially larger than the page width here.

First, set up the SDL file thusly. Note that I am only tracking the presence of avatars in the region, not the states of the individual objects. Also, be sure to enable the "Age Global SDL" setting in the World panel. This is OFF by default.
Show Spoiler


Attach this node tree to the region object. Note that I am using the xAgeSDLBoolSet script to ensure that I am setting True for enters and False for exits. Further, I set up the exit region to only fire when the region is empty.
Show Spoiler


Attach this tree to all objects you want to SHOW when the region is occupied.
Show Spoiler


Attach this tree to all objects you want to HIDE when the region is occupied.
Show Spoiler
Image
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 2139
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

Re: Time to wire - but where to start?

Postby Tsar Hoikas » Fri May 01, 2020 6:15 pm

Tsar Hoikas wrote:Unfortunately, I cannot test them atm because the HDD all my Uru installs live on died and is presently being recovered


OK, my Uru installs are alive again. I've attached the sample age blend file--it works as expected when exported with Korman 0.10-dev. It should work under Korman 0.09 as well.
Attachments
KormanNodes01.blend
(721.44 KiB) Downloaded 92 times
Image
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 2139
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

Re: Time to wire - but where to start?

Postby ametist » Sat May 02, 2020 10:30 am

Thank you so much Tsar Hoikas, for taking time to provide a blendfile with those trees! With your use of the xAgeBoolSet.py together with the xAgeBoolShowHide.py I could directly see how it should work.
I copied your trees exactly and used them in my age and created a VERSION 2 in my SDL by copying VERSION 1, pasting the text beneath and renaming it to VERSION 2.

Unfortunately it does not work! Nothing happens… I have tested with both the .py files from the moul-master folder, and the ones in src folder in the python folder of my URU:CC installation. No difference.

So it must be something that I have done wrong here, maybe in my installation? I use the files from GOG because I cant get my windows 10 pc to run Uu.exe(renamed Urusetup.exe) from an installation with the old discs - URU Complete Chronicles. And I have tried many times…

But I can export fine and Korman works fine with this installation.

I have no idea whats causing this :roll:
User avatar
ametist
 
Posts: 354
Joined: Fri Dec 28, 2007 6:55 am

Re: Time to wire - but where to start?

Postby Tsar Hoikas » Sat May 02, 2020 11:51 am

Can you export my blend and try it? I suspect we are getting bitten by a bug that was fixed between 0.09 and 0.10.
Image
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 2139
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

Re: Time to wire - but where to start?

Postby ametist » Sun May 03, 2020 6:50 am

Oh them bugs :twisted: - normally I am not a fan of bugs but in this particular case Id rather hope it is a bug rather than me being stupid :lol: . Yesterday I thought so because I know booleans and integers, even if I most often use them inside 'if'- statements.

I can not export your age, there are no buttons 'Export Age' and 'Package Age' beneath the 'Plasma Games' in 'World' in the properties menu.
Attachments
Properties.jpg
Properties.jpg (32.71 KiB) Viewed 1085 times
User avatar
ametist
 
Posts: 354
Joined: Fri Dec 28, 2007 6:55 am

Re: Time to wire - but where to start?

Postby diafero » Sun May 03, 2020 10:29 am

(I'm not sure how Uru reacts to altering a variable's description. Might be better to avoid it altogether, and only add new variables...)


Just to fill in on that detail... for alcugs at least, there is some updating logic that migrates the old SDL state to the new one. Removing variables is thus certainly fine, and for altering them... I actually had to dig into the code for that, but it looks like this is handled correctly: if you change size or type, the old value will be removed and the default value used instead.

plLogicModifier requests an exclusive lock from the server via plNetMsgTestAndSet before triggering

Funny that you should mention that message... for Aclugs we never really figured out what to do with it.
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2917
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: Time to wire - but where to start?

Postby Tsar Hoikas » Sun May 03, 2020 1:11 pm

ametist wrote:I can not export your age, there are no buttons 'Export Age' and 'Package Age' beneath the 'Plasma Games' in 'World' in the properties menu.


Check the blender console window and see if there are any errors. Usually missing UI elements indicate a traceback while Korman is executing.

diafero wrote:Funny that you should mention that message... for Aclugs we never really figured out what to do with it.


Certain complex multiplayer situations depend on proper locking. https://github.com/H-uru/dirtsand/blob/ ... #L495:L527
Image
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 2139
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

PreviousNext

Return to Scripting

Who is online

Users browsing this forum: No registered users and 1 guest