Script commands I'd like to see in the next version....

Post ideas & suggestions you have pertaining to the game here.
Post Reply
Apemant
Commonwealth Pilot
Commonwealth Pilot
Posts: 94
Joined: Mon Dec 03, 2007 12:51 pm

(objGetVelVector obj): or at least, make objIncVel return the new velocity vector after applying the change. Then I'd just do (objIncVel (sysVectorPolarOffset Nil 0 0)) to retrieve the current one, hee hee

(objGetAngle obj destObj): just like objGetDistance which retrieves the modulus of a posVector, I could really use this, to get the angle between two of them.

(shpSetData gPlayerSip attrib value) to alter player ship attributes like mass or maxDevices :twisted:

Ability to set the "objName" attribute of a newly created station, so that sysFindObjectByName can find it (actually, so that objGateTo node entryPoint would work with that name, :wink: )

(plySetPlayerShip plyShipUNID) :lol:
- actually, it should be (plySetPlayerShip obj), so you would first have to sysCreateShip and then 'move' to it, leaving the old shp behind. Among other benefits of the ability to switch ships in the middle of the game (that'd really add some depth), this would allow for a mission where you'd temporarily become the pilot of some aquila cruiser armed to the teeth, and after finishing the mission, get back to your own ship. :)

Talk about money sink... well, ships would naturally be extremely expensive to buy...
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

(shpSetData gPlayerSip attrib value) is very unlikely due to attrib are not saved they are brought from the xml when the game is loaded.

(plySetPlayerShip plyShipUNID) hmm well we have some problems to solve before adding ships to the game. Like all ships are nearly the same. :?

The others seem reasonable.

hmm things that I would like to see

The ability to return a value from a function that is not in the same extension. (I am not sure if this is still a current limitation)

randomSystemName: returns a random name from a pool, this will never pick the same name twice in a given game

gameStart: a function in the xml that the player can overwrite, must be called after the first system and player and playership are all defined

itmGetStaticData: the ability to store any info you want in the xml and get it in code would make our lives much easier
Crying is not a proper retort!
Apemant
Commonwealth Pilot
Commonwealth Pilot
Posts: 94
Joined: Mon Dec 03, 2007 12:51 pm

Betelgeuse wrote:(shpSetData gPlayerSip attrib value) is very unlikely due to attrib are not saved they are brought from the xml when the game is loaded.

(plySetPlayerShip plyShipUNID) hmm well we have some problems to solve before adding ships to the game. Like all ships are nearly the same. :?
Exactly! That'd be the desired course of development if I was asked... ships are really the same, while there should be an array from very small, very fast ships to very large ones; but it should be possible to play them all and beat most of the opponents with any of them - but using different approaches. (brute force vs. wits and reflexes)

Small ships would be limited in power department, so they wouldn't be able to get the strongest weapons or shields around; but, they would be very agile and fast, in fact, propulsion devices should have their maxSpeed value dependent on ship's size/mass. That way you could get speeds north of 40 for small ships with propulsion devices which don't draw much power; whereas even pteracnium megadrive wouldn't be able to make aquila cruiser faster than, say, 15.

Smaller ships should also be disproportionally harder to hit, I'm not sure how the collision code works though. The idea is that a small ships just can't install crazy stuff like Taikon-200 deflector with ion field upgrade, :lol: but they shouldn't even need that, when they can just dodge bullets. While really large ships (which would look great now with 40 faces) should need mammoth-sized shields to cope with everything that will hit them easily due to their size and their lack of maneuverability.

As for shpSetData - I know the values aren't saved, but that's why I said 'next version'. It's up to George of course, whether he wants to change it or not, these are just suggestions from my viewpoint as a modder.

Betelgeuse wrote: randomSystemName: returns a random name from a pool, this will never pick the same name twice in a given game
Hmm, I believe this can be done already. You'd make a list of all random names. Then you would pick a random one. Then you would enum through that list and create a new list using lnkAppend, where you would add all the elements except the one you just extracted. That should work (in theory). You could even make a global lambda function out of it...
Betelgeuse wrote:gameStart: a function in the xml that the player can overwrite, must be called after the first system and player and playership are all defined
Hmm, OnCreate on playership class doesn't work?
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Apemant wrote:
Betelgeuse wrote: randomSystemName: returns a random name from a pool, this will never pick the same name twice in a given game
Hmm, I believe this can be done already. You'd make a list of all random names. Then you would pick a random one. Then you would enum through that list and create a new list using lnkAppend, where you would add all the elements except the one you just extracted. That should work (in theory). You could even make a global lambda function out of it...
Betelgeuse wrote:gameStart: a function in the xml that the player can overwrite, must be called after the first system and player and playership are all defined
Hmm, OnCreate on playership class doesn't work?
sorry nope the system names do not allow for functions
OnCreate on the playership activates before many of the values are set so you can't use alot of the globals
Crying is not a proper retort!
Apemant
Commonwealth Pilot
Commonwealth Pilot
Posts: 94
Joined: Mon Dec 03, 2007 12:51 pm

Betelgeuse wrote:sorry nope the system names do not allow for functions
Ops, sorry, didn't actually notice the name of the function you proposed... just thought you need a random name from a list, which never appears twice. :)

Betelgeuse wrote:OnCreate on the playership activates before many of the values are set so you can't use alot of the globals
Ah, but is the timer already functional at the time of the OnCreate? I mean, can you do a sysAddTimerEvent? Admittedly, I didn't try it myself...
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Ah, but is the timer already functional at the time of the OnCreate? I mean, can you do a sysAddTimerEvent? Admittedly, I didn't try it myself...
hmm that might work.

oh that reminds me that there used to be some problems with adding custom events to overwritten ships can you do that now? I think that is why I didn't try this solution in the first place.
Crying is not a proper retort!
Apemant
Commonwealth Pilot
Commonwealth Pilot
Posts: 94
Joined: Mon Dec 03, 2007 12:51 pm

Betelgeuse wrote:
oh that reminds me that there used to be some problems with adding custom events to overwritten ships can you do that now? I think that is why I didn't try this solution in the first place.
Seems it's fixed, although I didn't test it extensively; but this worked fine

Code: Select all

<Events>
    <OnCreate>
        (sysAddObjTimerEvent 60 gSource "OnDelayedInit")
    </OnCreate>
    <OnDelayedInit>
        (objSendMessage gPlayerShip Nil "This occurs 2 seconds after the start of the game.")
    </OnDelayedInit>
</Events>
when I added it to a modified playership in an extension. Why do you need it, BTW? Some late additions to the ship which can't be done within the xml? :D
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

well I want it to work with all ships even modded ones so you can't depend on them (Starton station works though). One reason to do this is to make random values right away in the game to change up trade. There are other reasons but I can't recall right now why I wanted it.
Crying is not a proper retort!
User avatar
Ttech
Fleet Admiral
Fleet Admiral
Posts: 2767
Joined: Tue Nov 06, 2007 12:03 am
Location: Traveling in the TARDIS
Contact:

Betelgeuse wrote:well I want it to work with all ships even modded ones so you can't depend on them (Starton station works though). One reason to do this is to make random values right away in the game to change up trade. There are other reasons but I can't recall right now why I wanted it.

So whats this part of? Oh wait... :)
Image
Image
Post Reply