Home   Help Search Login Register  

Author Topic: SPON Scripts (OBSOLETE)  (Read 4539 times)

0 Members and 1 Guest are viewing this topic.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
SPON Scripts (OBSOLETE)
« on: 25 Aug 2007, 13:30:39 »
This package is now out of date and will not be updated again. The good news, however, is that it is slowly being replaced by its sub-components being released seperately :D

Look at the SPON Core release to see a list of components that have been re-released so far. Please feel free to IM me if you wish to discuss those sub-components that only exist in SPON Scripts, but sub-components that have been re-released should be discussed in their respective threads.

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

This is the first open release of my general scripts pack (SPON Scripts) and, in fact, my first ArmA release!

Some of the features are certainly variations on existing scripts, but I'm sure that overall it contains a large number of innovations that I hope the community might find useful! The scripts have been tested for a while already within the RGG squad, but I felt it was worthwhile showing it outside that limited group now, especially because if I don't release it some time, I'll never release it :whistle: Still, it is very, very early BETA, so probably not a good idea to use it on your critical projects just yet, but the included demo mission is fine for a look-see...

Thanks in advance for suggestions (especially configuation options you'd find useful) and bug-finding! If anyone likes the pack and would like to help me out with some decent icons, than that would be appreciated even more!

Current release: SPON Scripts demo v0.0.21 (2007-08-24)

Features for players
- Friend recognition:
    - Anyone playing the game properly will have friend & foe tags off since they are very gamey, however, there needs to be some way to recognise your comrades!
    - Dummy action on people you know to tell you their name.
    - See members of your group as "Fred Bloggs".
    - See members of your side, outside your group, as "Fred Bloggs (WEST 1-1-C)".
    - See drivers as "Driver: XXX" or "Pilot: XXX" when looking at a vehicle.
    - For MP only (Pointless in SP, but team-switch breaks it badly anyway).
 
- Respawn management based on a player's side:
    - Individual's numbers of respawns before final death (unlimited or 0..N respawns). "Final death" starts kegetys spectator script.
    - Respawn delay (while waiting to respawn, you just see a black screen. This needs replacing with something prettier ;P).
    - Which sides are visible when spectating (well, just hooking this info up with the spectator script that does the work).
    - Graveyard location (The graveyard is a contrivance since using spectator script means you can still see "dead" players lishould be able to remove this eventually).
 
- Conversations with AI:
    - "Talk" action on specific AI (or inanimate objects if you prefer).
    - AI says something then you have 1-5 options of replies. Click on a reply or press the number (1-5) to select it.
    - Conversations are constructed from a tree (Array of arrays).
    - Can run code based on how the tree is traversed.
    - NPCs automatically record if they have ever spoken to you before.
    - Does everything a conversation does in an RPG like NWN, except no multi-npc conversations, images or keeping a log of the conversation as it goes along. Some or all of these features may be implemented later.
 
- Money and commerce:
    - Player cash and bank balance are recorded and displayed in a dummy action.
    - Banking:
        - Can transfer money into and out of the universal bank at banker.
        - This is currently achieved using actions, but I will soon be making a dialog window for this.
       
    - Shopping:
        - Can buy specific weapons, magazines and one-use items (explosives, grenades, etc) or vehicles at specific shops.
        - Can sell any weapons and one-use items at any shop. Magazines can't be sold because you can't query how many rounds are left.
        - Information display for last item selected to buy/sell.
        - Accurately tracks what you are carrying and so does not allow you to buy anything you can't carry.
 
- Rear-view "mirrors":
    - Pressing and holding shift-[turn left] or shift-[turn right] will change to looking through the leftlior right-hand mirror.
    - Limitation: View is not mirror reversed ;( Just pretend you are sticking your head out the window if this worries you.
    - Ignores other keypresses (like steering and acceleration) while looking. Not sure if there is a way to allow you to drive while using an alternate camera.
    - Implemented in HMMWV only. The positions are fiddly to set up, so I'll wait until I'm sure I want to do it this way before doing the rest.
 
- Replaced the "I" scoreboard with an information overlay:
    - Order of battle, showing all groups and chain of command.
    - List of soldiers in your group, indicating kit, vehicle and crew position using icons.
    - List of soldiers in your vehicle, indicating kit and crew position using icons.
 
- Map that you can actually draw all over:
    - Opened and closed via '['. Probably need a better key choice later.
    - Drawings are automatically shared by SIDE in MP.
    - Can draw in 6 line colours.
 
- Weapons alterations:
    - VBIEDs (car-bombs):
        - Everyone has a "Place VBIED" action if they have satchel charges.
        - Need a satchel charge and to be next to an unoccupied vehicle to place a VBIED.
        - Can then detonate all placed VBIEDs with another action, which is available if you are inside or outside a vehicle.
       
    - Blank rounds (West only):
        - Suppressed rounds fired from non-suppressed M9/M4/M16/M249 have no effect.
       
    - Self-arming UGL:
        - Red flare fired from M203 (or other UGL) acts like a self-arming HE round.
        - It will not detonate unless it has about 25m of uninterrupted flight before it impacts.
       
    - Disposable M136: M136 is discarded after it is fired. A seperate launcher and round is still required to use it, but the launcher is effectively one-use.
    - Rangefinder added to SOFLAM (a.k.a. Laser marker).
        - Shows range and, optionally, azimuth and elevation.
        - Best viewed using the NWD optics addon. I used this addon's SOFLAM optics to layout the information on my overlay, but even without this addon, the script still works fine. NOTE: NWD has his own rangefinder script available, but it requires an addon.
       
    - UGL smoke: White and green UGL flares act like the appropriately coloured smoke grenades.
 
Features for mission-developers:
- Debug log:
    - Makes a permanent record of all debug messages, viewable in a window, thus not cluttering up the screen with debug messages.
    - Using SPON_TRACE macros, the debug commands are only executed in debug mode (so don't slow the server down lisaves you commenting them all out for release versions).
    - Allows the client to view all debug messages that have been generated on the client or the server at any time!
   
- 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).
    - SPON_addEventHandler to register a handler for an event.
    - SPON_removeEventHandler to remove handler for an event.
    - SPON_publishEvent to initiate a local or global event which will be sent to every handler registered for that event.
    - Some events are already raised by the framework:
        - "SPON_playerConnected" => [_name, _id] (global)
        - "SPON_playerDisconnected" => [_name, _id] (global)
 
- Key event handling:
    - Allows de-coupled key event handlers to be set up (normally a new key event handler deletes any existing handler).
    - SPON_addKeyEventHandler, SPON_removeKeyEventHandler
 
- Standardised equipment kits:
    - Each kit has an icon that will be shown on the new scoreboard. Kits can share a kit icon if they have similar roles.
    - Since kit details are held in a seperate script, not in the mission.sqm, changing the equipment for all 20 riflemen in your mission would be a doddle (no need to use the editor to change each soldier individually).
    - Kits are re-equipped after respawning (assuming the SPON respawn-management option is being used).
 
Known Bugs
- Recognition: Changing position from driver will keep same vehicle recognition name. Changing position to driver does not set the vehicle recognition name.
- Rangefinder: There can only be a single rangefinder (SOFLAM) per SIDE in the mission. Not sure this can be overcome satisfactorily.
- Scoreboard and rear-view mirrors: The keys used to operate these functions are read from what the player has configured at the START of the mission. This means that if keys are changed during the mission, these functions won't change.
- Couple of seconds of freeze when first spawning as a soldier. I'm sure this can be fixed if I just think about it for a while.
- Icons are pretty much all place-holders, either to be redrawn by me, or someone who can draw, ASAP ;P
- Map drawing: If a very long line is drawn, then fails to send it in MP (raising an error for all players). Not hard to fix; I just haven't got around to it.
- Map drawing: If you JIP after a line has been drawn, then you never see it.
- Logging: The server log is broken currently, but it was working before now. Honest ;P
- Respawning: You can still use your character while waiting to respawn in the dark (since I'm mostly handling respawn, not the game). This won't be a problem once I make the respawn window.

Third-party work included:
- Some icons drawn by Law [RGG] specifically for SPON.
- Kegetys Spectator script used (actual version included in the demo taken from BAS f pack), at least until I can replace it with something that suits my purposes better.
- Not "included" as such, but significant testing and feedback by members of RGG squad. Thanks fellas!
- Not "included" either, but thanks to those on BI/OFPEC forums that have helped me out.

Design aims:
- Promote teamwork and improve general gameplay.
- Increase realism.
- Improve and streamline UI.
- Configurability and inter-operability.
- Avoid addons, in favour of scripting, as far as possible.

Coming soon (ish):
- Map:
    - Able to place markers on it, just like the regular map. The dialog to choose them will make this a lot easier, especially when you have a large number of icons installed ;P
    - Allow drawing/markers to be seen by group/side/global.
    - Set line thickness (Probably just thin and thick options).
    - Automatic kick/ban for people who use the interface to draw rude things ;P
   
- Molotov Cocktail: You know what this is (alters behaviour of red smoke grenade)! It sets people and vehicles on fire too (This is partially implemented already, but is totally broken in MP ;P).
- Respawn management: Respawn chosen from a map when you die. Respawn points can be added, removed, enabled or disabled during play.
- Banking: Currently uses actions, but this will be replaced with a proper dialog window.
- Demo: Hints when you log in to explain what specific thing the soldier you are playing as is testing.
- Documentation: How to install and configure the scripts. I was lazy...
« Last Edit: 02 Oct 2007, 10:00:36 by Spooner »
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: SPON Scripts
« Reply #1 on: 25 Aug 2007, 16:08:44 »
Quite interesting set of scripts. But they seem to be unrelated to each other. Dont you prefer to split the scripts in different resources/forum threads, so that they may be handled, tested, discused, finished and hosted separatedly?

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: SPON Scripts
« Reply #2 on: 26 Aug 2007, 20:18:25 »
Well, I sort of expected that someone would tell me to split up the pack...

The reason everything is together is mainly because a "couple of scripts" got a lot of feature-bloat that never quite got around to being split up. The other thing is that quite a few of the scripts do have common components that might not be obvious - I really need to plan how they get split up, stay compatible and avoid the worst of the possible versioning issues that would come with seperation. So, yeah, I accept that I do need to split it down, though exactly how much is open to debate. One of the main reasons I released right now, before getting this all sorted out properly, is because I needed to release and show people what I was working on rather than keeping making scripts in isolation; the next time another person beat me to releasing something like something that I had already developed, but hadn't released, I was going to cry ;( [I'm really not complaining about people beating me to release, because the first released is the first released regardless of which was "allegedly" developed first, but I didn't relish this happening again, especially since it was entirely my fault...].

So, anyway, for the very immediate future I'll be keeping everything together until I'm ready to split them up. Although they are distributed as a pack, each of the individual features can be enabled, disabled and configured seperately in the init.sqf, so it shouldn't be too much trouble for users to change at a later date if they do decide to use this release. I'm also not sure whether the weapon modifications shouldn't be in an addon rather than just in scripts, such as "makes the red UGL flare act like a self-arming HE round"; this type of alteration requires a level of remembering what things are supposed to do and, although I'd rather implement them as scripts, I think addon(s) might be a lot more sensible in the long term.
« Last Edit: 27 Aug 2007, 02:14:14 by Spooner »
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline MattiusRochelle

  • Members
  • *
Re: SPON Scripts
« Reply #3 on: 27 Aug 2007, 02:13:47 »
wow. Whos been a busy boy :O That NPC Talking Scipt will come in very handy indeed. and some of the others too  :shhh:

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: SPON Scripts
« Reply #4 on: 27 Aug 2007, 02:21:46 »
I hate to admit it, but there has been an NPC talkie thing about for a while, I think by CrashDome (I only saw it discussed in a thread about modifying it). Unfortunately, I didn't find out about that until I
had already made by own, but I thought I'd release mine anyway, since I imagine they are not exactly the same ;P
« Last Edit: 27 Aug 2007, 11:38:05 by Spooner »
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: SPON Scripts
« Reply #5 on: 27 Aug 2007, 14:43:37 »
Looks fab, really fab!

Say...is there, uhm, any chance I could 'borrow' that buying/selling script from you?  :whistle: That is to say, blatantly rip it from your collection and deviously use it to further my own evil plans? Or, rather, my own future mission(s)? Basically it's -exactly- what I need for this thing I've been working on for a while (there're traces of it here and there, including the vehicle-saving script and the thread you mentioned above), and, well, if I could use it, that'd be just swell. Super-swell, in fact.

I promise to credit you! (also, if there's some way to "easily" disengage it from the rest of the scripts, that'd be double-plus good).  :D

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: SPON Scripts
« Reply #6 on: 27 Aug 2007, 16:39:56 »
There really isn't any really good way to seperate the shopping for now from everything else, without manually working out which files you don't need (I wouldn't advise it), but the actual scripts are around 250k (just taking out Keygetys's spectator script and the demo mission-specifc stuff), so it is not what you would call enormous! For the time being, you could just enable the money/shopping/banking functionality and leave everything else domant; just comment out everything but the call to "initMoney.sqf" in the "init.sqf", make your own prices.sqf and use makeShop.sqf to make any NPC a shopkeeper. Sorry that the installation documentation is still a little lacking, but if you have specific questions, then you could ask them here and I could put the answers in the README.

Hmm, since you didn't mention the banking, I should really make the bank-balance display on the shopping dialog optional; I realised before now that not everyone would want shopping and banking together, but never got around to putting it in the config. If you don't make a banker NPC, then the bank balance is irrelevant anyway.

I'm releasing this pack just so people will use it, so as long as there is credit given, you can do what you like with it! I didn't state this specifically, since it was implied by the fact I released the scripts publicly; if I didn't want others to use it, I could have saved myself an enormous amount of effort in making generic!

Incidentally, the reason I built the shop/bank/conversations in was in order to make a Nogville/Crime City style mission with a friend, but I got so caught up with making these components, I'm not sure when I'll actually get back to the actual mission part of it ;P Is that the sort of thing you are working towards?

@ everyone above
Thanks for the positive comments! I'm just sorry that some things are still a bit more ropey than they should be for a proper release (especially the documentation and "one big pack" issues).
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: SPON Scripts
« Reply #7 on: 28 Aug 2007, 10:10:12 »
 :good: Finally had a chance to test this, and I do say, excellent, excellent stuff! Well, particularly the buy/sell thing made my day. I might want to poke around in it a bit, for instance make it usable with TeamSwitch (say, for instance, you want to re-equip your entire squad: so you enable teamswitch while the buy/sell dialog is up, and then simply teamswitch through your entire squad, changing their equipment as is necessary). Now if it were possible to make the buying/selling work on a less personal level, that'd be swell too (basically allow you to "sell and buy" between the invisible shop pool and a weapon pool like used in a campaign).

Ah well, I'll start working on that soonish enough. For now, thanks for the framework  :clap: As to for what...think more of a dynamically constructed, story-driven campaign with RPG elements.  :cool2:

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: SPON Scripts
« Reply #8 on: 28 Aug 2007, 13:39:26 »
Well, I only play MP/COOP, so I have to admit that team-switch and campaign compatibility is a very low priority for me :whistle: I admit I hadn't considered what you are asking for, but it does seem like something that would be useful to a fair number of people. I'll certainly put some time into thinking about how best to implement something for the SP folk, though I can't make any promises of implementation at this point; as you can see, I've spread myself rather thinly already :confused:

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

Planned split-up
================
I've put some time into considering how best to split up my stuff. Can't get away from having a core components pack though, required by each of the other components. Still not sure if I should split down SPON Game into its 3 components, because although they do affect each other, they aren't really tightly coupled (e.g. you need kits for the scoreboard to show kit icons, but if you don't have kits, you just won't see the icons). Well, keeping them together would make my testing easier (won't need seperate componenent and integration test missions), so I think I'll go that way...

- SPON Core
    - Debug log
    - Events
    - Key events
    - Vehicle tracking

- SPON Conversation
- SPON Disposable M136
- SPON Game
   - Kits
   - Respawn
   - Scoreboard

- SPON Map
- SPON Money (Including shopping & banking)
- SPON Rangefinder
- SPON Rear view
- SPON Recognition
- SPON VBIEDs
- SPON Weapons Replacements
    - UGL smoke
    - UGL self-arming
    - Molotov Cocktail
    - Blank rounds
« Last Edit: 28 Aug 2007, 14:16:07 by Spooner »
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: SPON Scripts
« Reply #9 on: 09 Sep 2007, 19:00:04 »
 :) So, how's the progress on this? They're a very nice little bunch of scripts, and cutting them apart some might increase their potential for use. I'd gladly use some of them (well, mostly the banking and money and conversation scripts at the moment), but having such a large amount of extra stuff (lots and lots of needed description.ext space, for instance) might be a bit dissuading.

No stress, of course. I could probably reverse-engineer it myself as well somehow. But yes, just to let you know that there ARE people who are interested in these.  :good:

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: SPON Scripts
« Reply #10 on: 09 Sep 2007, 19:56:55 »
While splitting them up, I've taken the opportunity to rewrite huge chunks of code that annoyed me, which is why I've not re-released everything again yet ;P Mandoble was right, in that trying to work on so many things at once is stopping me finishing any one of them, but now I have the additional problem that I want the SPON Core pack to work properly before I release anything that is so dependent on it. So, overall, getting there, if slower than I'd like; I'm hopeful I'll be starting to release the first components by the end of this week *fingers crossed*

Don't worry, SPON Money has had a fair bit of love and now the interface behaves a little more intuitively. SPON Conversation hasn't got any further, or even been made to use SPON Core yet - I see it as lower priority since a similar thing already exists, but still, I might as well go on with it since it does have unique features. While you are so keen on conversations, perhaps you could tell me whether the conversation tree structure I designed makes any sense to you? There is an example tree built in "demo.sqf" and the data structure is described (if not deeply explained) in "SPON_Scripts\setConversationTree.sqf". Anyway, no problem if you don't want to take a critical look at that, but I was worried that maybe I over-engineered it; Can't see a simple way of implementing conversations unless you make them quite restrictive though.

I've also considered scrapping SPON Rangefinder, since there is already a similar thing out there. However, since the alternative version relies on an addon for some reason and works slightly differently, I might go somewhere with that again.

Anyway, thanks for the encouragement; it has been a bit of a slog this last fortnight, but now I can get some more enthusiasm going!
« Last Edit: 09 Sep 2007, 20:18:39 by Spooner »
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: SPON Scripts
« Reply #11 on: 16 Sep 2007, 17:10:39 »
This package is now out of date and will not be updated again. The good news, however, is that it is slowly being replaced by its sub-components being released seperately :D

Look at the SPON Core release to see a list of components that have been re-released so far. Please feel free to IM me if you wish to discuss those sub-components that only exist in SPON Scripts, but sub-components that have been re-released should be discussed in their respective threads.
« Last Edit: 23 Sep 2007, 12:51:53 by Spooner »
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: SPON Scripts
« Reply #12 on: 16 Sep 2007, 18:22:16 »
Excellent news  :good:, closing this thread.