Home   Help Search Login Register  

Author Topic: SPON Core v0.5.3 (incl. debug log) (ACCEPTED)  (Read 27286 times)

0 Members and 2 Guests are viewing this topic.

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: SPON Core v0.5.1 (incl. debug log) (READY)
« Reply #30 on: 04 Sep 2008, 20:58:23 »
So Spooner, when are you going include an addGlobalEventHandler? :P
urp!

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: SPON Core v0.5.1 (incl. debug log) (READY)
« Reply #31 on: 04 Sep 2008, 22:16:40 »
SPON_addEventHandler catches all SPON events. However, you raise SPON events using SPON_publishLocalEvent, SPON_publishRemoteEvent and SPON_publishGlobalEvent, which is what determines which SPON event handlers fire.
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: SPON Core v0.5.1 (incl. debug log) (READY)
« Reply #32 on: 05 Sep 2008, 16:41:56 »
Yes, but looking at your code it seems to me that you can only add event handlers locally. Am I mistaken?
urp!

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: SPON Core v0.5.1 (incl. debug log) (READY)
« Reply #33 on: 05 Sep 2008, 16:48:54 »
Yes, the whole SPON event system isjust an improved wrapper for publicVariable events (though my events system predates publicVariable events and used to use object-init for messaging). Just like PV events, you register handlers locally, then publish the events whereever you want.
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Killswitch

  • Members
  • *
  • Peace, cheese and ArmA
Re: SPON Core v0.5.1 (incl. debug log) (READY)
« Reply #34 on: 06 Sep 2008, 22:30:48 »
If you use SPON_Core as an addon, how would you go about getting SPON Core into "debug mode", ie the equivalent of calling
Code: [Select]
["DEBUG_CLIENT_SERVER", nil, true] call compile preprocessFileLineNumbers "SPON\Core\initCore.sqf";in a mission using the script based SPON Core?
« Last Edit: 06 Sep 2008, 22:34:10 by Killswitch »

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: SPON Core v0.5.1 (incl. debug log) (READY)
« Reply #35 on: 07 Sep 2008, 02:28:26 »
This is something I need to address properly at some point, but right now, you could use a fudge. You could either edit the config.cpp in the addon to start core up the way you want or you'd call, in the mission init:
Code: [Select]
_debugOnServer = true; // Perform server debugging (actually broken at the moment, but no harm in enabling it).
_useActionForDebugLog = true; // To add a universal action to open the log, rather than using key-press to open it.
[_debugOnServer, _useActionForDebugLog] call SPON_initDebugLog;
(though, as I say, the server debugging is broken currently ::)). You'd not get debugging for any addon init if you used the latter method though...

EDIT: ...But you would get debugging for addons after init time.
« Last Edit: 14 Apr 2009, 18:33:14 by Spooner »
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Killswitch

  • Members
  • *
  • Peace, cheese and ArmA
Re: SPON Core v0.5.1 (incl. debug log) (READY)
« Reply #36 on: 07 Sep 2008, 23:09:36 »
Roger on the fudging. Thanks!

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: SPON Core v0.5.1 (incl. debug log) (READY)
« Reply #37 on: 08 Sep 2008, 20:39:11 »
I have a suggestion for the next version. It would be a server side SPON local event wrapper for the ArmA onPlayer(Dis)Connected.

Quote
Just like PV events, you register handlers locally, then publish the events whereever you want.
But being able to PV code means one could register handlers remotely.
« Last Edit: 08 Sep 2008, 20:42:43 by Mr.Peanut »
urp!

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: SPON Core v0.5.1 (incl. debug log) (READY)
« Reply #38 on: 21 Sep 2008, 12:50:44 »
By upgrading to the new XEH 1.9, you should avoid those occassional "time == 0" error windows that SPON Core spits up.
[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 Core v0.5.1 (incl. debug log) (READY)
« Reply #39 on: 24 Oct 2008, 19:31:18 »
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).
« Last Edit: 24 Oct 2008, 19:33:43 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 Core v0.5.3 (incl. debug log) (ACCEPTED)
« Reply #40 on: 04 Nov 2008, 02:13:56 »
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).

Download SPON Core v0.5.3

EDIT: 0.5.2 had a silly bug in it I saw as soon as I'd released it, so I quickly updated it!
« Last Edit: 04 Nov 2008, 03:07:07 by Spooner »
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Dr Eyeball

  • Members
  • *
formatTime.sqf
« Reply #41 on: 12 Nov 2008, 04:54:41 »
Suggestion for future version.
To make the formatTime.sqf function more useful and in preparation for Arma2, alter your parameters to accept the format string to use, instead of using a boolean.

See fn_vbs_timeToString for recommended format.
I have adopted the same technique now, but slightly different formats. See source fn_TimeToStr.sqf.

There's no true format parsing required, so it's very simple to do since the format permutations are limited.
An invalid parameter simply defaults to the default format.
It also makes it more readable, since you don't need to lookup your function to know the format used by the boolean parameter.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: SPON Core v0.5.3 (incl. debug log) (ACCEPTED)
« Reply #42 on: 22 Jan 2009, 08:08:31 »
The SPON Core/Rangefinder inside ACE is exactly the same as the only released separately, so it can be used in exactly the same way. Thus when you play ACE, there is no difference to having SPON Core and SPON Rangefinder loaded separately.

Your situation depends on what exact combination of addons and mission scripts you have running:
* SPON Core addon or mission script: OK.
* SPON Core addon + any SPON component addons: OK.
* SPON Core mission script + any SPON component mission scripts: OK.

* SPON Core, or any SPON component, running as both addon and mission script at the same time: OK (Addon takes precedence, but will still be configured by the settings meant to affect the mission).

* SPON Core mission script + any SPON component addons: Not OK (SPON component addons always require SPON Core addon).

* SPON Core addon + any SPON non-GUI component mission scripts (does not have a ui directory, such as SPON Scuba or HoloMap): OK

* SPON Core addon + any SPON GUI-based component mission scripts (i.e. has a ui directory, such as SPON Map or Recognise): OK, but needs a workaround.

The workaround is to just to add a small part of Core to your mission (25k, so a lot smaller than whole of SPON Core):
* Place a "Game Logics\SPON\SPON Core: Requre" logic object in the mission editor, to ensure that it can't be played without having the SPON Core addon loaded.
* Include the SPON\Core\ui folder (just hpp files), leaving out all the scripts and other bits of SPON Core.
* At the top of the description.ext:
Code:

#include "SPON\Core\ui\core.hpp"

Remember that you can just leave SPON Core mission scripts in your mission and you have no problems at all (all you are doing is wasting some space). This is the simplest option and does not require that the mission be played with SPON Core addon, so is the one I recommend really.

Sorry that this issue is relatively complicated, but you have to remember that virtually no other ArmA modder releases addons and script versions of the same items, let alone ones that are so cross-compatible and simple to use :P
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline awotter

  • Members
  • *
Re: SPON Core v0.5.3 (incl. debug log) (ACCEPTED)
« Reply #43 on: 07 Apr 2009, 07:49:24 »
Hi Spooner,

I can't seem to get SPON debug to work with ACE. I have no problem running your demo and I set up a mission using your SPON instructions and I can get that to work in regular ArmA (QG), what am I missing?

I've been working with Doomguy's WACO trying to port it over to Avgani and in the course of trying out some new things I've run into a bug that I can't track down via ArmA.rpt.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: SPON Core v0.5.3 (incl. debug log) (ACCEPTED)
« Reply #44 on: 10 Apr 2009, 22:14:15 »
Well, please ensure you are using a proper ACE edition of WACO. The latest SPON Core would be in the latest ACE, so that can't be an issue. Can't really think of other issues, but have you tried getting SPON debug to work with ACE with a simple (non-Warfare) mission?
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)