Command "set sphere"

Announcements and discussion regarding any projects related to Cyan Worlds' Plasma Engine including (but not limited to) CyanWorlds.com Engine, Drizzle, OfflineKI, PyPRP, and libHSPlasma.

Re: Command "set sphere"

Postby D'Lanor » Sun Jan 09, 2011 11:36 am

Sirius wrote:Anyway, back to topic, it would be cool if the /set sphere command could set also the current sphere in "normal" Ahnonay. But way too complicated...

Not that complicated. I dug this up from my 2005-2006 POTS hacks.

Show Spoiler

I don't think it produced any visual or audible effects when you were in Ahnonay, but then I usually did this in Relto before linking to Ahnonay.
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Command "set sphere"

Postby kaelisebonrai » Sun Jan 09, 2011 10:16 pm

oh, btw, if we did the mutliple spheres in one age, we could do something /cyan/ didn't. We could set different fog settings for each sphere - like there are in PotS, but not MOUL - Paradox has mentioned that its possible in the past =)
User avatar
kaelisebonrai
 
Posts: 849
Joined: Sun Feb 03, 2008 3:27 am
Location: Perth, Western Australia

Re: Command "set sphere"

Postby Sirius » Mon Jan 10, 2011 10:37 am

Thanks D'Lanor. Maybe it will also help me for save cloth.

Will it also work when someone else is in Ahnonay while using it ?

If I understood correctly, I could also try this:
Code: Select all
        if chatmessage.startswith('/sphere'):
            currentSphere = self.GetAhnonaySphere()
            if ((currentSphere < 4) and (currentSphere >= 0)):
                self.SetAhnonaySphere(currentSphere + 1)
            else:
                print 'invalid sphere value, resetting...'
                self.SetAhnonaySphere(1)
            return


For fog setting, is this why there is a small difference between the Sphere 2 fog in CC and MOUL ?
And it seems there are two different fogs in Sphere 4 (sphere and vortex). I don't know if it is used by one of the Python files...
Anyway, as we are not supposed to have all the spheres merged in one Age on Drizzle...
Last edited by Sirius on Mon Jan 10, 2011 11:53 am, edited 1 time in total.
User avatar
Sirius
 
Posts: 1506
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: Command "set sphere"

Postby D'Lanor » Mon Jan 10, 2011 11:08 am

That only increases the sphere number. How would you go back?

I made this for offline use but it might work online depending on the shard's instancing setup.
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Command "set sphere"

Postby diafero » Mon Jan 10, 2011 11:32 am

That's right. Then I should better think of changing page nums, age name and sequence prefix of the current version of Ahnonay we have with Drizzle (unfortunately impossible, it seems it can't change most of the age's sequence prefix). It would be even better for lever, clues and the water (the water never looks calm on MOULa).
Drizzle should be able to do that, it is already changing prefixes for MOUL, MystV, ... ages.

There is another strange thing: when you install the Offline-KI on PotS (even when you just install KI files), it really takes a lot more of time than without. Is it just because of the big Python file for the KI ?
I suspect Relto is slower because of the book linking covers. And maybe the parsing of the config files and other preparations done in Python slow it down. I doubt it is the few additional prp files, or the size and amount of Python files (it's just a maybe 5% increase, I think).

And maybe it could be a good idea to tell the command to use the good anim and not the wrong one. It shouldn't be too complicated with Python.
Well, I would have it do that if I knew how ;-) . All the command is doing is setting some SDL variable. For some reason, the animation is wrong. Maybe xAgeSDLIntStateListResp.py is no working properly in POTS.

And yes, that code by D'Lanor will work on Alcugs since there is a shared Ahnonay instance. That's why the cloth does not always link you where you put it, if someone else played Ahnonay in the mean time :) . Ahnonay uses exactly that posted code internally.
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: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: Command "set sphere"

Postby Sirius » Mon Jan 10, 2011 11:52 am

Yes, I forgot a part in the script: I wanted the /sphere command to be used only in AhnonayMOUL to turn the spheres in the Moul version and to change the sphere in "normal" Ahnonay.

For the anim problem, I just wanted to use directly the good anim and to avoid someone the use of /set sphere 1, then /set sphere 1, then /set sphere 1 etc. Else the spheres warps to the position of the beginning of the anim and that's not really beautiful...

Sorry for the two confusion :?

What I get when I change the prefix of an Age is and error with a "SimpleRotController" or something like this. I'll try with another version of Drizzle.
User avatar
Sirius
 
Posts: 1506
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: Command "set sphere"

Postby diafero » Tue Jan 11, 2011 3:02 am

For the anim problem, I just wanted to use directly the good anim and to avoid someone the use of /set sphere 1, then /set sphere 1, then /set sphere 1 etc. Else the spheres warps to the position of the beginning of the anim and that's not really beautiful...
...?!? This is an absolute set command, so /set sphere 1 makes the first sphere active (it does NOT increase the sphere counter).
Now, I know what you mean with the animation, but I do not know how to fix 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: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: Command "set sphere"

Postby Sirius » Wed Jan 12, 2011 6:41 am

I finally got it working !

I used D'Lanor's python with some small modifications.
To be sure my explanations don't confuse anyone again, here is how it works:
- the "/sphere" command is usable only in AhnonayMOUL
- it turns the spheres in the good order (increases the SDL var every times used and reset to 0 when the current value is 4)
- if the sphere number * is active in AhnonayMOUL, the sphere * is active in "normal" Ahnonay.

There are still small problems as the current sphere isn't updated when you link in AhnonayMOUL. It plays the good anim, but causes to warps the spheres again, so I'll probably add something to update it.

diafero wrote:Now, I know what you mean with the animation, but I do not know how to fix it ;-)
Would it work this way ? It still allow the /set sphere, but it turns it in the good order...
Code: Select all
    if (cmnd == 'sphere'):
        currentSphere = int(xUserKI.GetSDL(ahnyCurrentSphere[0], 0))
        if ((currentSphere < 4) and (currentSphere >= 0)):
            xUserKI.SetSDL('ahnyCurrentSphere', 0, (currentSphere + 1))
        else:
            print 'invalid value, resetting...'
            xUserKI.SetSDL('ahnyCurrentSphere', 0, 0)
    return None


diafero wrote:I suspect Relto is slower because of the book linking covers. And maybe the parsing of the config files and other preparations done in Python slow it down.

It seems that was the problem, thanks ! It now starts quicker.
User avatar
Sirius
 
Posts: 1506
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: Command "set sphere"

Postby diafero » Fri Jan 14, 2011 10:47 am

Well, you command does exactly the same as /set sphere, doesn't it? It just sets the SDL. Okay, it makes sure that it is always increased by one, but as you say it's still not animating properly but warping around, so there was no change? Or did I misunderstand you?
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: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: Command "set sphere"

Postby Sirius » Sat Jan 15, 2011 12:45 pm

Yes, this one just turns the sphere in the good order, and only in the Moul version. It is just because you said there wasn't any way to avoid the anim bug that warps the spheres. It is because of the "/set" which allows the user to choose the wrong anim (and doesn't allow a non-admin player to see the spheres rotate online).

I fixed the other bug in the script for Ahnonay and AhnonayMOUL spheres. It was just because the active sphere in AhnonayMOUL didn't matched the active one in Ahnonay when you linked in, as the script says "when /sphere is used, assign to AhnonayMOUL the active sphere number of Ahnonay + 1". To solve it I simply used the GetAhnonaySphere of D'Lanor in the AhnonayMOUL Python file to find the active Ahnonay Sphere and set the SDL value in AhnonayMOUL depending of it, in order to tell the game to update it as soon as you link in.

It was mainly a test to see if the spheres could be updated in one of the Ages depending of which one is active in the other. I think I'll put a lever to replace the /sphere command somewhere in the engineer hut, it should be better from an IC point of view. Or simply do as in MOUL, and the anim could be seen only in multiplayer.
User avatar
Sirius
 
Posts: 1506
Joined: Mon Jul 26, 2010 4:46 am
Location: France

PreviousNext

Return to Plasma Development

Who is online

Users browsing this forum: No registered users and 0 guests

cron