Jump to content
Sign in to follow this  
Guest

Scripting

Recommended Posts

Guest

Use this thread to add suggestions for new script commands and new functionallity.

----------------------------------------------------------

My top wishes:

1) setNormal and getNormal functions that set and return the normal (vector) to an object  (i.e to get and set pitch, bank and roll)

2) saveString and saveObject functions to save strings and objects to files.

3) Basic string functions such as charAt(pos) strcat, strcmp etc etc

4) Explicit commands that bypass the behavioral AI such as target,fire, move etc

Share this post


Link to post
Share on other sites

Just a thought but couldnt you implement most of the best scripts about into the game ??

Then make a list of what and how to activate them and what there for ?

Share this post


Link to post
Share on other sites

I would very much like it if the whole scriptin thing would be changed into a object based thing, for example instead of doing

someUnit setDammage 1

I would do something like

someUnit.damage = 1

or, instead of

? (getpos someUnit) select 2 > 2 : hint "we are airborne!"

I would do

? someUnit.pos.Z > 2 : player.showMessage "we are airborne!"

Each object could have different parameters and functions in it, this way I think it would be much more clearer to use as there wouldnt be hundreds of commands of which only some are useable on a certain type of object.

Share this post


Link to post
Share on other sites

Ability to pass any arrays by value, to allow for use of arrays in recursive functions.

More overall access to gamestate for scripters ie:

[*]getDamage that returns damage of all components on vehicle

[*]getEnvironment (date,rain,overcast,etc.)

[*]bindKey function (bind scripts to a key or combination on keyboard)

[*]Network sharing of all data types if possible (coming to OFP1 anyway but complicated)

[*]More information on human players in some accessible data array, to eliminate the need for scripted network handshaking.

[*]Full access to AI functions/sensing, to allow for scripted learning AI. (longshot I guess) As it is AI has so much of it's own brain it's nearly impossible to control it manually.

[*]object (#) function that returns objNull instead of crash on non existing objects

[*]All terrain objects such as trees and bushes to be in some vehicle heriarchy like tanks and units to be analysed in script

[*]bleedingRate function to set the rate at witch the soldier bleeds unless 1st aid is applied wink.gif

Share this post


Link to post
Share on other sites

Make it possible to make the mission time of day follow the server time of day (or just a designated timezone - maybe also latitude affecting sunrise/dawn). This would be harder, but it would also be nice to make the mission weather follow real world weather - this would require looking in a weather database (if such one exists) for the weather at a selected position.

The great effect in this is that it makes the missions vary greatly depending on the current weather, and thereby changing the user experience. It shouldn't be enforced, but should be a option for mission makers.

Share this post


Link to post
Share on other sites
Make it possible to make the mission time of day follow the server time of day...

This is already possible through the use of missionStart command in the mission. I have already implemented this in some missions of mine.

There rest is not. smile.gif

Edited by W0lle

Share this post


Link to post
Share on other sites
Guest

A re-introduction of allowDamage would be nice smile.gif

Share this post


Link to post
Share on other sites

"allowradio"

or something. This would make it impossible to use the radio, or see sidechannel chatting if "false". Could be very nice for missions and make (distant radio) < 200 : allowradio myguy false

or something like that. Maybe not the ofp team wants, or the public but since i will soon do my conscript service and probaly doing something with radio/communications, i been thinking about it alot wink.gif

EDIT: Not sure if this is the right place. But would be great if you could set the "respawn weapon" of the soldier. Working on a swedish forces addon and boring that i have to choose ak74, m16 or ak47 for respawn weapon and can't put the AK5 (FN FNC)..

Share this post


Link to post
Share on other sites

Almost forgot about this completely,

[*]ability to getMarker text and setMarker text. Why not? And createVehicle marker... lol you know what I mean

[*]Also full control of triggers from scripts. (Ability to create a trigger, resize it, set all attributes, main enable/disable)

On a side note, how about drawing of markers like with paint etc, so that you can make all shaped outlines of areas etc, fill them in or not. confused.gifsmile.gif

Share this post


Link to post
Share on other sites

Dynamic Waypoint scripting. eg. CreateWP, setWPType, SetWP#, SetWPRadius, etc

Share this post


Link to post
Share on other sites

CaseOf CtrlInUse 100

{

     (TypeOf (CharToReal (CtrlText 100))) != "Float": ctrlSetText [100,""] ; hint "Bad number"

     CtrlText 100 == "uiox sucks" : endcase; closedialog 0

     endcase     

}

Share this post


Link to post
Share on other sites

I like to see:

The ability to set specialized WP's like the in editor such as S&D.

I'd like a better debug interface maybe a popup box to watch in the editor. Sometimes big command errors are lost or fly by. Better yet an error.log would be great.

I'd also like the createmarker on the fly idea along with setmarkertext.

Hoz

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (bn880 @ 28 April 2003,18:27)</td></tr><tr><td id="QUOTE">Almost forgot about this completely,

[*]ability to getMarker text and setMarker text.  Why not?  And createVehicle marker... lol  you know what I mean

[*]Also full control of triggers from scripts.  (Ability to create a trigger, resize it, set all attributes, main enable/disable)

On a side note, how about drawing of markers like with paint etc, so that you can make all shaped outlines of areas etc, fill them in or not.  confused.gif  smile.gif<span id='postcolor'>

Absolutely, that's why I want to be able to parse strings.

We should be able to dynamically reset waypoints and trigger functions through scripting. Its just way more efficient.

Share this post


Link to post
Share on other sites
Guest jacobaby

A means to get the current environment status would be good.

Also wind factors affecting vehicles/trajectories......

And vehicles that dont make dust in the rain or after rain, maybe replace it with spray.

Init eventhandlers from CPP's to run correctly on all clients (make that ALL the eventhandlers)

Ability to identify unit who has you as target.

But more importantly as far as addon making goes....even if the game is set in history, to make the ability available for us to simulate modern weapons better, with their capabilities.

In built script editor into the editor itself.

More than anything GetPitch/roll/bank etc of an object.

Command "switchside" to enable units to change sides.

Ability to change player camera to another unit mid game, to make possible multirole missions.

Error.log text dump for those messages which fill the screen and cant be read.

deployable light sources eg torches, TACs and better management of projected lighting.

A range of built in fire/ explosion/ damage /smoke/ lighting features mission makers can use, similar to what BAS have done with the recent addons.

Ability to command more than 12, or to command other groups.

Netcode that plays like BHD............. confused.gif

and so on.....

TJ

Share this post


Link to post
Share on other sites

There should be some simple way of seeing if an enemy knows about the player's location. This would be of tremendous help in writing scripts that enable enemy AI units to call in artillery and airstrikes on the player and player's units.

Share this post


Link to post
Share on other sites
Guest jacobaby

Hmm, Schoeler,

Have you tried using KNOWSABOUT?

Here is a line you can use to see how the "knowledge" of the enemy increases the more they know about you.

It would now be very easy to use this variable to determine if enemy should be able to call arty strike etc.

hint format ["q1 knows %1", q1 knowsAbout player] 

You will need an enemy unit called Q1 and yourself.

TJ

Edited by W0lle

Share this post


Link to post
Share on other sites

I want forcemap, shownmap and showmap commands that

1) Control the map with a boolean, set to on or off

2) Force the map to be displayed independant of pressing the m key (not the normal forcemap overlay)

3) Detect if the map is displayed or not.

These commands would be INCREDIBLY useful for sripting functions that require the map to be turned on or off. For example, dialogs that come up when you go into the map screen, close the map when you exit them, or scripts that keep the map on screen until the player takes some action, like clicking.

This would streamline custom insterfaces considerably...

Share this post


Link to post
Share on other sites
These commands would be INCREDIBLY useful for sripting functions that require the map to be turned on or off. For example, dialogs that come up when you go into the map screen, close the map when you exit them, or scripts that keep the map on screen until the player takes some action, like clicking.

This would streamline custom insterfaces considerably...

And during a dialog can move the map or zoom in it, if we don't have during game dialogs, have during map dialogs, very usefull for design a C&H the island missions...

About strings:

Scripters have to debate about this.

My point of view:

Create a limitation of 256 characters, so we have string, not text.

Don't care about minusc and majusc, (not case sensitive in English?)

No idea for the moment for ascii characters...

Commands:

PosString

_Pos = PosString ["ca","abcabc"]

_pos == 3, return always first find

Length

_Length = length "OFP2 2004"

_Lenght == 9

Substring

_Result = SubString ["abcde",2,3]

_result == "bcd"

Edited by W0lle

Share this post


Link to post
Share on other sites

Simplify MP scripting.

It shouldn't depend where you use commands if they are working or not. The need for some commands to be executed where an object is local is making MP scripting verry complicated, especially with the actual system how and where actions and eventhandlers can be used.

Share this post


Link to post
Share on other sites

I think that scripting in ofp should be simplified like Microsoft Windows simplifies DOS. "POINT AND CLICK INTERFACE." There should be a point and click interface that covers all the scripting in the game without the player having to memorize anything. A 5 year old should be able to script an entire cutscene, a helicopter landing and pickup sequence, enemies dropping their weapons when you arrive, music played in an object, all without having to manipulate files or download tutorials, and all compliments of an easy to use point and click interface. I'm talking paradropping extra equipment, calling in bombings, calling in evacs, calling in mortar support, kinda like that one addon. I'm talking everything that can be done in the game should require no typing whatsoever. It should all be simple point and click. Focus on "point and click interface" and everything should work out fine.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Romolus @ 06 May 2003,00:37)</td></tr><tr><td id="QUOTE">Simplify MP scripting.

It shouldn't depend where you use commands if they are working or not. The need for some commands to be executed where an object is local is making MP scripting verry complicated, especially with the actual system how and where actions and eventhandlers can be used.<span id='postcolor'>

Simplify? In OFP1 you can't really script MP.

Why? Cause with triggers and WP you can solve and script VERY GOOD MP MISSIONS.

A lot of awesome MP missions are done without script.

We want more, and BI ear, and understand what we want.

BUT if you want more,  you are in the scripter domain, so learn yourself.

Ask to our masters how many hours for understanding a little part of OFP.

It's a choice of BI, don't forget OFP is a game, not an operating system.

First we buy, play with it, after we script (for a very little part of us).

I'm a gamer, for me OFP is a very good game, if in OFP2 I will have pleasure of playing : win for BI.

PS: MP scripting does not exist in OFP1, it's an invention of our scripting gurus.

PS2; I agree with you if you say : create mp scripting

Share this post


Link to post
Share on other sites

It's not the MP mission scripting I'm concerned about it's the scripts that are included in addons for advanced features.

In addon scripting you can't use triggers and such editor depending things, you only can use the scripting language. There are many advanced features possible in the game that work perfect in SP but are in the easiest case a real pain to get them working properly in MP and in some cases simply impossible to do.

The whole addon install issue is made even worse when the mission designer has to place gamelogics or fill in some scripting code in the init field of some units just to make the advanced features work.

So simplifying the MP scripting should also be part of the enhancements for addon handling, not just easy installing.

Allmost every higher quality addon that's been released in the past had some sort of advanced scripted features and the tendency to include more scripted features is still growing.

Nothing is won when the addons install really easy and the mission designer has quite a hard time to get the addon to work in the mission just because of the way scripts in addons have to be done for multiplayer.

Share this post


Link to post
Share on other sites

[*]One thing most of us at the CoC also would like to suggest is that the init EH in addons actually fires on all machines.

If not all the EH's, since it is easier to say : ?(not local (_this select 0)): exit;

than have to create a network communication solution.

[*]Please support the same comment syntax /* */ and // in loadFile as in preProcessFile. Sorry to say I lost a bit of time wondering what the heck was going wrong when converting some NS code to an addon. crazy.gifsmile.gif

[*]Please add that access to system time/date both in SP and MP mission. Perhaps setDateTime function is possible? tounge.gif

Share this post


Link to post
Share on other sites

I'd like a simple command to save a variable used in multiplayer for the next game with same mission(and maybe same server).

If there was a command to save a boolean value to indicate if the mission was played before, difficulty could be higher the second time around. Or it would be possible to make one mission into a sort of a campaign by saving the numbers of units left for the next time. It could even be extended to singleplayer and/or campaigns to allow some sort of replaying a mission without 'starting over' for improving realism. - 'take out the tanks' ...play mission... 'go back and finish the job'... play mission again.

The possibilities are endless, and it would be possible to make missions with even higher replayability than now.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×