Jump to content
Sign in to follow this  
Spooner

SPON Core

Recommended Posts

SPON Core v0.5.3

debugclientnq1.jpg

- Released: 2008-11-04

- Install size: 114k (mission scripts) / 183k (addon version)

- (mission version) 100% scripts with no addon dependencies

- (addon version) Requires XEH (1.9 or higher), but this is included in the release.

- Requires ArmA 1.09 or higher

- See attached README.html for full details

Download

OFPEC

ArmAholic (mirror)

ePrison.de (mirror)

SPON@YouTube

SPON releases

SPON Core is required by:

- SPON Attachments v0.3.0 (Attach/detatch ACOG and other accessories to weapons in-game).

- SPON HoloMap v0.3.0 (3D holographic representation of the game world)

- SPON Map v0.6.0 (Freehand drawing and improved marker placement interface)

- SPON Money v0.1.2 (Shopping and banking)

- SPON Radar v0.1.0 ("Old-school" long-range radar with a sweeping beam revealing "blips")

- SPON Rangefinder v0.3.0 (Shows range, azimuth and elevation overlayed on the SOFLAM view)

- SPON RearView v0.2.1 (Rear-view mirrors for most vanilla and QG vehicles).

- SPON Recognise v0.3.0 (Recognise friends standing next to you, even if friendly tags are off).

- SPON Scuba v0.1.0 (Underwater swimming and demolitions)

- SPON Status v0.3.0 (Informational display clearly showing order-of-battle, group members and vehicle crew).

- SPON VBIED v0.2.0 (Place car-bombs on vehicles).

Other scripts of mine that don't need SPON Core, but that include debugging messages that can be seen if SPON Core debug-log is used:

- SPON Kits v0.1.1 (Standardised equipment kits).

- SPON_deathMesssages v0.2.1 (Configurable death messages to replace the default ones).

My functions (no dependency on SPON Core or use of debugging):

- SPON_deepEquals v0.2.0 (Compare nested arrays for equivalency).

- SPON_directionName v0.1.1 (Convert numeric vector or direction into name, e.g. [1, 1, 0] => "North-East")

- SPON_getWeaponType v0.1.0 (Find out the general type of a weapon, based on its name, e.g. "M9" => "PISTOL").

- SPON_formatNumber v0.1.0 (Proper number formatting, e.g. 1234.567, to two decimal places with 1000s seperators => "1,234.57")

- SPON LOS v0.1.0 (Calculating line of sight)

- SPON_viewVector v0.1.1 (direction the player's screen is "looking", rather than body or weapon facings)

My scripts used by third parties:

- SPON Sensor - Vehicles detected by radar appear on everyone's map (Included in PRACS Beriev Be-32k addon).

Overview

Core components required by most of the other SPON script packs (the README for each package will say whether it actually requires SPON Core and what minimum version is required). Many of the features provided here might be of use in creating your own mission scripts.

SPON Core is avilable in two versions. One is an addon and the other is mission-script-based which does not require any addons to be installed on client or server. It requires ArmA 1.09 or higher.

Features

- Standard

* Provides common features used by other SPON components, such as SPON VBIED, SPON Recognise and SPON Map.

* User event handling: Any player or server can broadcast local or global events. Those that have previously registered for the event will have their code run (Used very similarly to standard ArmA events).

* Broadcasting object variables with SPON_publicObjectVariable.

* Key event handling: Allows de-coupled key event handlers to be set up (normally a new key event handler deletes any existing handler).

* Some global variables (read-only) to complement the built-in "isServer".

* SPON_formatTime function is available: Formats an elapsed time, in seconds, as 0:00:00 or 0:00:00.000, which is appropriate for formatting elapsed time ("time" command), but not time of day.

- Optional

* Debug log:

o Makes a permanent record of all debug messages, viewable in a window, thus not cluttering up the chat window with debug messages.

o Allows the client to view all debug messages that have been generated on the client or the server at any time (JIP clients can only see server messages generated after they joined)!

* Automatic monitoring of in-game men and vehicles:

o Lists of player, men and vehicle objects in the mission are kept updated.

o SPON events are published whenever any of these is found on the server for the first time and when a player is first or last found on the server. These events can be used to perform init actions on the objects, without the need of addons (Although init might be slightly delayed after the object has been created).

Limitations

Compatibility

* Addons and Scripts:

o If SPON mission-script is used with SPON addon, only the addon version will be run (so ensure your addons are up to date).

o (Mission-version only) If SPON Core debug log is used with keys, rather than action to open the map, it is not compatible with any other script or addon that detects key-presses (unless it uses SPON Core or Shole's DEH key-press handlers, of course).

Known bugs

* Variables updated with SPON_publicObjectVariable are not automatically updated for JIP players (though JIP players will get any new values sent after they have joined).

* Debug message logging on dedicated servers is currently broken.

Plans

* Ensure that SPON_players_* arrays are synchronised across all machines and updated immediately on join/leave in progress by another player.

* Allow registering global event names, so that they can be published using less bandwidth.

* Expand USAGE section in README.txt, to make the systems more usable by third parties

Credits

* *Provide a common set of scripts to minimise the repetition of scripts within the other SPON components.

* To provide a strong base for anyone developing SP, and especially MP, missions.

* Consistent GUI across all SPON GUI-based components. Font/colour schema can be chosen from a selection of standard schema.

* Avoid addons, in favour of scripting, as far as possible. Addon version and 100% mission-scripts versions are available!

Change Log

v0.5.3

- Fixed

* Using the debug log can reset the value of nil.

* Adding multiple key event handlers to one key will cause only the first to be run [Reported by i0n0s].

* SPON_isMP is incorrectly set to true in SP missions (unless you are playing from the SP editor without saving the mission).

(See readme.html for full details of changes before current version).

spooneroq2.jpg ???

Edited by Spooner

Share this post


Link to post
Share on other sites

I will have a look at this in detail.

The macro functions sound interesting to me and overall the

framework has a lot of good features in it.

There are a few similar ones out to these. So I am looking forward

to see your code, how easy is it to understand it and to be able

to build own stuff on it. smile_o.gif

Share this post


Link to post
Share on other sites

No-one except myself has attempted to use anything in SPON Core as far as I'm aware (I'd extremely doubt it). Probably because a lot of the features are not documented and...I haven't documented them outside of the files themselves because no-one has shown any interest ;P

Be wary that several things in SPON Core, that have not been used in any SPON Component yet, may not actually work ;P

The most important thing for third parties, I think, is the key event handlers, which allow everyone to share the one key event handler we have in the game.

Share this post


Link to post
Share on other sites

yeah thats among the macros most interesting to me so far.

already had a look at your older versions from time to time,

yet not really in depth check smile_o.gif

Share this post


Link to post
Share on other sites

Could be a problem with the use of XEH - does any SPON component use XEH?

Share this post


Link to post
Share on other sites

Well, SPON Core and SPON Map both use XEH to start up, using the init handlers specifically.

XEH init code for SPON Core:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

SPON_Core_init = "if ((time == 0) and (isNil ""SPON_Core_isAddon"")) then { SPON_Core_isAddon = true; [] call compile preprocessFileLineNumbers ""\SPON_Core\SPON\Core\initCore.sqf""; }";

The init for SPON Map is identical, but with "Map" replacing "Core". These inits run fine, but you'll notice that I didn't put on a semicolon at the end of the line (this is option in the syntax). You can see that the error you are getting is actually the end of the SPON Core init line running into the beginning of the SPON Map init line.

Everyone else who's tried SPON Map/Core have had no problems, so I wonder if you are actually using an older version of XEH that didn't add a semi-colon to make the concatenation of the init lines safe? Please try using the newest version of XEH, which is, at this time, 1.7 (it is included in the SPON releases).

Share this post


Link to post
Share on other sites

There should be a semicolon at the end (for older XEH versions):

Quote[/b] ]SPON_Core_init = "if ((time == 0) and (isNil ""SPON_Core_isAddon"")) then { SPON_Core_isAddon = true; [] call compile preprocessFileLineNumbers ""\SPON_Core\SPON\Core\initCore.sqf""; };";

as XEH adds the different executions lines to one big string/line.

Better add it to be on the safe side. smile_o.gif

Share this post


Link to post
Share on other sites

Right, I thought it was that. I've added the semicolon for backwards compatibility, but I don't think it is worth a release just for that, since people should always try to use the newest versions of addons like XEH anyway. Future SPON releases will be compatible though.

Share this post


Link to post
Share on other sites

More, more, more.......LOL

Sry, nice work, keep it up.

If you feel like a change of scenery, and want to chip in to the RPG concept may be you’d like to add your view to the City Life project, we are normally on the [Recon] ts 72.36.212.90:8767, feel free to pop in

Share this post


Link to post
Share on other sites

I think I might have to cave in and use this, even if just for the debug log. (caCommsLogic globalchat format ["blah %1",blah]; is getting a bit tiresome.

I already have my own implementation for most of the above components, so I wonder if it would be worthwhile to use the SPON implementations instead. (key eventhandling, local client commands/events, network broadcasts & client requests).

I think I'm most interested in addPermanentAction and broadcastObjectVariable. I might want to look at your key handler and local/global eventhandlers though.

1) Is there built in always-on network traffic that I can turn off? I'm trying to have the absolute minimum of network traffic.

2) How many functions and scripts are running by default on the client machine? I don't want to be running more than what is necessary.

Also, I used your spon_statusdisplay (and looked at the code) and found out the awesome trick: if you return true from a key handler, you override the default arma key behavior!! This is a real nugget of info that has seriously helped me out. I was trying my own map replacement, and my solution was to close the map displaypermanently, also killing gps, compass, and watch.... whistle.gif

Thanks a lot!

(The map is display #12, btw)

Share this post


Link to post
Share on other sites

The only network traffic is when you have server logging turned on (the data is currently being sent if that option is enabled, but for some reason it isn't coming up in the server debug log in this version. Need to fix that...).

On both client and server, a lot of functions will be pre-compiled at startup, but there are no continual scripts started by Core itself. The only continual script in Core is run to generate the player list, publish SPON events, etc, and is run only if requested, either by calling SPON_monitorVehicles or by running one of the SPON components that needs this information, such as SPON Map or SPON Status. SPON_addPermanentAction also uses this, so that it can add GETIN/OUT handlers to all vehicles. This object monitoring script does a far bit of processing, but only does it every 15 seconds (by default), so shouldn't cause much of an issue.

Share this post


Link to post
Share on other sites

SPON Core v0.5.1 released

Modified

   * Replaced GNU Public Licence (GPL) with the less restrictive Lesser GPL (LGPL).

Fixed

   * If SPON Core addon is loaded and SPON Core mission-scripts are run in the mission, then "things" get in a mess.

   * SPON Core key event handlers incompatible with Shole's Display Event Handlers (If both are used, DEH's key events will always work, while SPON's won't).

   * Some errors in macros.inc.sqf

Share this post


Link to post
Share on other sites

By upgrading to the new XEH 1.9, you should avoid those occassional "time == 0" error windows that SPON Core spits up.

Share this post


Link to post
Share on other sites

Thought I'd tell people about the AWACS script I wrote for Project RACS:

   - SPON Sensor - Vehicles detected by radar appear on everyone's map (Included in PRACS Beriev Be-32k addon).

Share this post


Link to post
Share on other sites

any screenshot or video available? wink_o.gif

Share this post


Link to post
Share on other sites

Actually, no. Screenshots don't really capture the script compared to other "tracker" scripts (just looks like some dots on the map ;P) and making movies that aren't terrible is beyond my skill. Just try it out and see for yourself...

Share this post


Link to post
Share on other sites

I did. Good script and very useful gameplay addition once again. Cheers!

Share this post


Link to post
Share on other sites

Maybe a better description of it would be helpful to others:

Basically, it is a variation on the standard "unit tracker" scripts. It draws dots on the standard map for vehicles, not men, within a given distance of your AWACS vehicle (handles multiple AWACS vehicles too). If IFF is enabled, then it indicates whether contacts are friend or not-friend (doesn't differentiate enemy from neutral), but otherwise they are all shown the same. The size of the dot indicates the size of the vehicle and for vehicles in the air, their height is shown too. The script can also be configured to only detect vehicles over a given size, so, for example, it might show planes and tanks but not littlebirds or motorbikes. Although the script is included in the Be32K addon specifically to be used with the AWACS variant of that plane, it could be used to make any land-, sea- or air- vehicle into an AWACS radar. Fully MP (COOP and PVP) compatible.

I might release it separately at some point, but for now, I'll leave it just available from that addon.

Share this post


Link to post
Share on other sites

Update

v0.5.3

- Fixed

   * Using the debug log can reset the value of nil.

   * Adding multiple key event handlers to one key will cause only the first to be run [Reported by i0n0s].

   * SPON_isMP is incorrectly set to true in SP missions (unless you are playing from the SP editor without saving the mission).

EDIT: There was a silly mistake in v0.5.2, which I discovered just after uploading it, so I re-released it as v0.5.3. Sorry to anyone who downloaded the original update!

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  

×