Jump to content

- - - - -

Scripting


  • Please log in to reply
282 replies to this topic
Thread Starter
Guest__*
Guest__*
  • Guests

  • Joined: --

Posted 25 April 2003 - 22:14 #1

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

Schoeler
Schoeler

    Master Gunnery Sergeant

  • Members
  • 1287 posts

  • Joined: 17-October 2001

Posted 25 April 2003 - 22:23 #2

We should be able to parse strings too.
\"My guard stood hard when abstract threats too noble to neglect, decieved me into thinking I had something to protect.  Good and bad I define these terms quite clear, no doubt, somehow.  Ahh, but I was so much older then, I'm younger than that now.\"  -The Byrds 'My Back Pages.'

Posted Image

In Memory of David Albert Schoeler, 1974 - 2003.

Third World Explosion Team

Junker
Junker

    Master Sergeant

  • Members
  • 678 posts

  • Joined: 21-May 2002

Posted 26 April 2003 - 16:18 #3

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 ?
Posted Image

Kegetys
Kegetys

    Warrant Officer

  • Members
  • 2752 posts

  • Joined: 01-July 2001

Posted 26 April 2003 - 17:20 #4

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.
Posted Image

bn880
bn880

    O=FP^2

  • Members
  • 6758 posts

  • Joined: 07-November 2001

Posted 26 April 2003 - 19:02 #5

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 Posted Image




"Peace can not be kept by force. It can only be achieved by understanding." Albert Einstein
Posted Image
Please report Arma 3 bugs in the Bug Tracker

mads bahrt
mads bahrt

    Staff Sergeant

  • Members
  • 295 posts

  • Joined: 20-November 2001

Posted 27 April 2003 - 05:19 #6

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.

bn880
bn880

    O=FP^2

  • Members
  • 6758 posts

  • Joined: 07-November 2001

Posted 27 April 2003 - 05:29 #7

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. Posted Image

Edited by W0lle, 13 April 2009 - 15:40.

"Peace can not be kept by force. It can only be achieved by understanding." Albert Einstein
Posted Image
Please report Arma 3 bugs in the Bug Tracker

Thread Starter
Guest__*
Guest__*
  • Guests

  • Joined: --

Posted 28 April 2003 - 09:20 #8

A re-introduction of allowDamage would be nice Posted Image

granq
granq

    Sergeant Major

  • Members
  • 1955 posts

  • Joined: 28-July 2001

Posted 28 April 2003 - 16:11 #9

"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 Posted Image

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)..




My streaming Perhaps catch me working on some addons.
http://www.anrop.se Swedish ArmA community.

bn880
bn880

    O=FP^2

  • Members
  • 6758 posts

  • Joined: 07-November 2001

Posted 28 April 2003 - 16:27 #10

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. Posted Image Posted Image




"Peace can not be kept by force. It can only be achieved by understanding." Albert Einstein
Posted Image
Please report Arma 3 bugs in the Bug Tracker

MintyBoy
MintyBoy

    Sergeant

  • Members
  • 123 posts

  • Joined: 27-March 2002

Posted 28 April 2003 - 17:03 #11

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

\"Prepare to F**k Main Generator!\"

uiox
uiox

    Sergeant

  • Members
  • 125 posts

  • Joined: 28-April 2002

Posted 28 April 2003 - 17:32 #12

CaseOf CtrlInUse 100

{

     (TypeOf (CharToReal (CtrlText 100))) != "Float": ctrlSetText [100,""] ; hint "Bad number"
     CtrlText 100 == "uiox sucks" : endcase; closedialog 0
     endcase     

}





hoz
hoz

    Retired Moderator

  • Members
  • 1276 posts

  • Joined: 03-October 2001

Posted 28 April 2003 - 19:36 #13

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
Editing/Modding/Scripting question? Head on over to OFPEC

Schoeler
Schoeler

    Master Gunnery Sergeant

  • Members
  • 1287 posts

  • Joined: 17-October 2001

Posted 29 April 2003 - 18:04 #14

</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.  Posted Image  Posted Image[/QUOTE]<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.
\"My guard stood hard when abstract threats too noble to neglect, decieved me into thinking I had something to protect.  Good and bad I define these terms quite clear, no doubt, somehow.  Ahh, but I was so much older then, I'm younger than that now.\"  -The Byrds 'My Back Pages.'

Posted Image

In Memory of David Albert Schoeler, 1974 - 2003.

Third World Explosion Team

Thread Starter
Guest_jacobaby_*
Guest_jacobaby_*
  • Guests

  • Joined: --

Posted 02 May 2003 - 00:12 #15

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............. Posted Image

and so on.....

TJ

Schoeler
Schoeler

    Master Gunnery Sergeant

  • Members
  • 1287 posts

  • Joined: 17-October 2001

Posted 02 May 2003 - 08:02 #16

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.
\"My guard stood hard when abstract threats too noble to neglect, decieved me into thinking I had something to protect.  Good and bad I define these terms quite clear, no doubt, somehow.  Ahh, but I was so much older then, I'm younger than that now.\"  -The Byrds 'My Back Pages.'

Posted Image

In Memory of David Albert Schoeler, 1974 - 2003.

Third World Explosion Team

Thread Starter
Guest_jacobaby_*
Guest_jacobaby_*
  • Guests

  • Joined: --

Posted 02 May 2003 - 10:35 #17

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, 13 April 2009 - 15:41.


The_Captain
The_Captain

    Gunnery Sergeant

  • Members
  • 427 posts

  • Joined: 07-June 2002

Posted 03 May 2003 - 11:16 #18

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...
AI Grenadier Aiming Fix
Close Assault: Company level team vs. team game mode for 32 players.

uiox
uiox

    Sergeant

  • Members
  • 125 posts

  • Joined: 28-April 2002

Posted 05 May 2003 - 17:39 #19

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, 13 April 2009 - 15:42.


Romolus
Romolus

    Sergeant

  • Members
  • 154 posts

  • Joined: 11-July 2001

Posted 05 May 2003 - 22:37 #20

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.
Posted Image