Author Topic: Function/Feature Requests  (Read 35538 times)

0 Members and 1 Guest are viewing this topic.

Offline takashi

  • Better than TrashMan
  • 29
Re: Function/Feature Requests
load.image:(filename)

imports images, for things like HUD pong. example: imports an image of a sandwich located in the same folder as the scripting.tbl.

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: Function/Feature Requests
gr.loadTexture() or gr.drawImage()?
« Last Edit: March 26, 2007, 05:15:23 pm by Wanderer »
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline takashi

  • Better than TrashMan
  • 29
Re: Function/Feature Requests
maybe.

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: Function/Feature Requests
I think you kinda missed what i meant.. Those two functions are already in the scripting so there isn't really any use for additional function.
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline takashi

  • Better than TrashMan
  • 29
Re: Function/Feature Requests
so how do you use them? just stick a filename in the parenthesis?

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Function/Feature Requests
read the scripting.html
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: Function/Feature Requests
Hmm.. Some weapon related functions would benefit if we had some sort of scripting functions to get weapon shooter object as well as weapon target (meaning the target against which the weapon was aimed at - if any) object directly from the weapon handle.
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: Function/Feature Requests
I bumped in a Parent variable for all objects, and Target, Homing Object, Homing Subsystem, and Homing Position types for weapons. Changes will be in the next build. I'm not entirely sure what the relationship b/t the last three is. :D
-C

 

Offline Axem

  • 211
Re: Function/Feature Requests
Can we have some way to give the AI orders through scripting?

 

Offline Axem

  • 211
Re: Function/Feature Requests
If that's too big of a request, how about getting access to the Gun/Shield/Engine System in the meantime? ;)

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Function/Feature Requests
can we get a multiply operator (which performs matrix multiplication) for orientation objects?
also can i get access to ship moi?

//Both implemented in CVS (Model.MomentOfInertia) --WMC
« Last Edit: November 24, 2007, 05:10:01 am by WMCoolmon »
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: Function/Feature Requests
Hmmm.. I think asteroid and debris equivalents to mn.Ships[] and mn.createShip() arrays/functions might also be rather useful additions
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Function/Feature Requests
couple more matrix requests, ones really easy, another might be difficult (or from what i  know it uses alot of math).

createOrientation(r1c1, r1c2, r1c3, r2c1, r2c2, r2c3, r3c1,r3c2,r3c3) --create an orientation object, with arbitrary fields.

//Implemented in CVS (ba.createOrientation) --WMC

the second one is

intrepolateOrientation(oria, orib, t) --interpolates between oria and orib by t and returns the resulting orientation. t ranges from 0 to 1 where 0  will return oria and 1 will return orib. if t = 0.5 then it will return a matrix that represents a rotation that is halfway between oria and orib.

//Implemented (matrix:interpolate()) --WMC

math ref
http://www.gamedev.net/reference/articles/article1691.asp#Q44

i could probibly write some functions in lua for this if i get the first function. though it would be much faster if handeled by c. i need theese for a keyframe animation system im thinking about doing (which would be usefull fo something like a giant robot mod).

im thinking about making a file format, using conventional freespace table style formatting. it would contain a referance for each subobject in a model that is to be animated and a list of keyframe markers to describe a point along a defineable timeframe. and each key would also be associated with a matrix.

this data would be loaded on game start. then when an animation is ready to be used, you call a function to get orientations for subobjects. you pass it a time key and and the name of the submodel, and the function will look up the preceding and following keys, intepolates between them to create a new matrix, and then applies that matrix to the sub model. this way momentary and looping animations could be handeled. also sence you control what time key gets used you can arbitraril;y control the rate of animation. for example, if you want the mech to move its legs faster at full throttle than at half throttle. it can also be used for momentary actions like recioling a gun or activating swing wings.
« Last Edit: March 23, 2008, 03:23:22 pm by WMCoolmon »
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: Function/Feature Requests
You can always take a orientation from any of the objects from the game and move on from there.
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Function/Feature Requests
seems a rather cumbersome way to do it if you ask me. if i want to write a function that returns an orientation, i would have to pass it an object in the game so that i can steal its orientation. if you ask me thats no way to program. id have to write 20 or so lines of code just so that i could create an orientation object, not good.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: Function/Feature Requests
Dunno if others agree but i could see some use for certain set of AI related scripting options. Possibly for directly forking the AI with scripts but mainly just for debugging and figuring out what is wrong in certain AI behaviors. Especially if there are no changes being planned to be made to the AI code. Stuff like the ones listed below might of use for others too...
Code: [Select]
aip->mode
aip->submode
aip->submode_start_time
aip->mode_time
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: Function/Feature Requests
I've added
- createOrientation
- orientation multiplication
- orientation tostring()
- Moment of Inertia

to CVS; these are fully tested and seem to work. The only thing I'm concerned about is that I can't really tell if matrices are treated the same way by the code as I treat them with Lua. My assumption is that they go r1c1 r2c1 r3c1 etc.

I've uploaded a debug build to warpcore, this also includes the bugfixes I did tonight on mantis.

I agree that interpolateOrientation sounds like it could be added; but I'm not familiar enough with matrices to do what's described in the document with the existing internal FS2 functions, at least not without further reading.
« Last Edit: November 24, 2007, 10:52:36 pm by WMCoolmon »
-C

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Function/Feature Requests
link is 404
is that the same build from the recent builds forum?

*edit*
nevermind, you just left out a d :D
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Function/Feature Requests
ok heres the first of many wish lists for the freespace rts mod, some we need, some we might need and some we could do without (probably because were doing it wrong):

getVectorFromScreenCoords(x,y,depth)
calculates a world vector based on screen coords and a depth value (we scripted a function to do this but its still off by quite abit).

//Implemented (gr.getVectorFromCoords()) --WMC

ship:warpTo(Position, Orientation, Delay)
warps out a ship, waits till delay, then warps it in at position with orientation.

alternatives are: a way to make ships enter a sort of limbo state, where they are not in the level but can be warped back in as needed. or just make them invisible to the ai, so they can be moved behind the camera and ignored until i warp em in where they need to go. or we need a way to create an almost copy of a ship, so we can move the real one somewhere and warp it out. then we can move the original back and call warpIn() to show the animation.

ship:setOrders("ordertype", object,  ect...)
sets a ships orders. mainly we need to be able to set waypoint orders for script generated ships, but if we can set any order that would be good. we mainly need this because the rts will use mainly dynamic orders that have to be set up at run time. should have the same params as the initial orders box. were mainly dependent on the ai to do everything the rts needs to do.

//Implemented (ship:giveOrder()) --WMC

Model.BoundingBoxMin
Model.BoundingBoxMax
self explanatory, needed for drawing targeting brackets

//Implemented (model.BoundingBox*) --WMC

thats it for now.
« Last Edit: March 23, 2008, 08:03:05 pm by WMCoolmon »
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Aardwolf

  • 211
  • Posts: 16,384
    • Minecraft
Re: Function/Feature Requests
Another thing for the rts mod, that might be able to replace the need for a give-orders script: a way to tell the event system to execute a fredded event that uses a list of ships as event arguments.
Basically: a script-triggered event that takes script-supplied arguments, but is defined in FRED.
I can't guarantee that this will solve the problem, but it might help.

Another thing: OnMissionStart and OnMissionEnd events would be very useful.

//Implemented ($On Mission Start, $On Mission End) --WMC

Also, in the long run, it would be nice if we could dynamically create events using the scripting language, that'd be awesome.

Yet another thing: we need to be able to make a warping-out ship not be deallocated, but instead place it in a sort of limbo state, from which we can return it at will using the scripting system.
« Last Edit: March 23, 2008, 03:50:28 pm by WMCoolmon »