Phasal Transporter - How does it work code wise?

Syrkres

Chieftain
Joined
Mar 3, 2016
Messages
95
Location
Mass
Just wondering if anyone has tracked how a Phasal Transporter (UNIT_PHASAL_TRANSPORTER) unit is allowed to transport units?

I am thinking it's an ability on the other units but can't seem to trace it down.

Anyone have any ideas of where to look?

Thanks

Update: Found a bit more:
From CivBEInterfaceModes.xml
Code:
		<Row>
			<Type>INTERFACEMODE_PARADROP</Type>
			<Description>TXT_KEY_INTERFACEMODE_PARADROP</Description>
			<Help>TXT_KEY_INTERFACEMODE_PARADROP_HELP</Help>
			<CursorType>CURSOR_PARADROP</CursorType>
			<Mission>MISSION_PARADROP</Mission>
			<HighlightPlot>1</HighlightPlot>
			<HotKey>KB_P</HotKey>
			<OrderPriority>198</OrderPriority>
			<Visible>1</Visible>
			<IconIndex>45</IconIndex>
			<IconAtlas>UNIT_ACTION_ATLAS</IconAtlas>
		</Row>

From CivBEMissions.xml
Code:
		<Row>
			<Type>MISSION_PARADROP</Type>
			<Description>TXT_KEY_MISSION_PARADROP</Description>
			<Help>TXT_KEY_MISSION_PARADROP_HELP</Help>
			<EntityEventType>ENTITY_EVENT_PARADROP</EntityEventType>
			<Time>30</Time>
			<Target>0</Target>
			<Build>0</Build>
			<Sound>1</Sound>
			<IconIndex>48</IconIndex>
			<IconAtlas>UNIT_ACTION_ATLAS</IconAtlas>
		</Row>

But it seems to stop there, I can't find anything on ENTITY_EVENT_PARADROP, which is what I assume does it.
 
Guess I just need to reverse engineer more (start with ability text).

Apparently calls, this sets it on the Units bar to Paradrop.
TipHandler (in UnitPanel.lua)

NewInterfaceModeChangeHandler (inGame.lua) sets the handler for when UI is clicked to paradrop.
[InterfaceModeTypes.INTERFACEMODE_PARADROP] = ShowParadropRangeIndicator,

Follow is called when click paradrop icon.
ShowParadropRangeIndicator (ingame.lua)
- which calls dll... darn...


I was hoping to create a one(1) shot paradrop unit, with limitations, but can't seem to limit drop locations, though I could limit it to 1 round which would allow you to then paradrop into the spaces....

may have to think on this (sounds too powerful).
 
Ok, some thoughts...

I can rewrite the ShowParadropRangeIndicator which checks for valid squares.

But would need to do the following:
  1. Define new INTERFACEMODE_<singleDrop>
  2. Add handler to InterfaceModeTypes - (can this be done if so how)
  3. Rewrite new SingleDropHandler
  4. SingleDropHandler would have to loop through current players units(how)

[InterfaceModeTypes.INTERFACEMODE_PARADROP] = ShowParadropRangeIndicator,
 
Top Bottom