Page 1 of 1
DORDER_RTR
Posted: 21 Feb 2012, 03:28
by aubergine
Can this be used on VTOLs, or only land droids?
What happens if the order is issued on a transporter? (same question goes for DORDER_REARM)
EDIT: Also, what is difference between DORDER_RTR and DORDER_REPAIR?
Re: DORDER_RTR
Posted: 21 Feb 2012, 03:38
by aubergine
And what is difference between DORDER_RTB and DORDER_RETREAT?
Re: DORDER_RTR
Posted: 21 Feb 2012, 16:00
by Per
Not sure what happens if RTR is used on VTOL. Probably nothing intended. DORDER_REPAIR is used to make a repair droid repair some other droid. RTR is used to make a droid go back to base to repair. DORDER_RETREAT is used to go back to a predefined retreat point, currently only used in campaign.
Re: DORDER_RTR
Posted: 21 Feb 2012, 21:00
by Artofeel
Per wrote:DORDER_REPAIR is used to make a repair droid repair some other droid.
Really? Not DORDER_DROIDREPAIR ?
DORDER_REPAIR it doesn't repair the buildings?
Re: DORDER_RTR
Posted: 03 Mar 2012, 06:05
by aubergine
@Artofeel: Correct, DORDER_REPAIR makes a droid repair buildings, not other droids. However I'm not sure if there is some foo in the WZ source that transparently maps DORDER_REPAIR to DORDER_DROIDREPAIR if DORDER_REPAIR is applied to a droid?
Re: DORDER_RTR
Posted: 03 Mar 2012, 06:33
by aubergine
From
order.cpp line 1592:
Code: Select all
case DORDER_RETREAT:
case DORDER_RUNBURN:
case DORDER_RUN:
psDroid->order = *psOrder;
if (psOrder->type != DORDER_RUN || psOrder->pos == Vector2i(0, 0))
{
psDroid->order.pos = asRunData[psDroid->player].sPos;
}
if (psDroid->order.pos == Vector2i(0, 0))
{
// We have still not managed to find a valid place to run.
objTrace(psDroid->id, "Wants to run, but has no designated retreat point - standing still.");
break;
}
actionDroid(psDroid, DACTION_MOVE, psDroid->order.pos.x, psDroid->order.pos.y);
break;
Anyone know what asRunData is (or more specifically what defines the .sPos property for a given player)?
Re: DORDER_RTR
Posted: 03 Mar 2012, 21:28
by Per
Hmm, seems I failed to see some senseless distinction between DORDER_REPAIR and DORDER_DROIDREPAIR. Will try to look into that more closely later.
asRunData is (another senseless) global that keeps track of where droids should run when they are issued a run order or fail a morale test. What? A morale test? This is another special hack that only applies to special campaign situations (and that should have been implemented in campaign scripts, not hardcoded in the c++ source). Oh, and it is consistently spelled wrong, so if you search for "morale" you won't find any hits. Try 'moral'.
Re: DORDER_RTR
Posted: 03 Mar 2012, 21:59
by Cyp
Not 'moral' test? It's not an ethics test, then?
Re: DORDER_RTR
Posted: 03 Mar 2012, 22:39
by aubergine
Is sPos the player starting position?
DORDER_RTR_SPECIFIED might be another pointless one to look at - surely we could just use DORDER_RTR with orderDroidObj()?
And speaking of Moral(e) is that something to do with DACTION_SULK?
BTW, if any of the DORDERs or DACTIONs change, is there some way to get notified?
Re: DORDER_RTR
Posted: 03 Mar 2012, 23:51
by Per
.sPos is the run-to position.
DACTION_SULK is a hack for working around obstacles.
You will sometimes get an idle notification when a droid goes from some order to none, but not yet consistent. Nothing else yet.
Re: DORDER_RTR
Posted: 04 Mar 2012, 00:58
by aubergine
Per wrote:You will sometimes get an idle notification when a droid goes from some order to none, but not yet consistent. Nothing else yet.
Sorry, I was unclear in my message above. I was referring to changes in the source code - eg. when Warzone itself gets changed. Specifically I'd like some way of keeping track of things so that I can keep my unofficial JS API docs up-to-date - they are getting somewhat extensive now:
https://warzone.atlassian.net/wiki/disp ... i/Contents