1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. Photobucket has changed its policy concerning hotlinking images and now requires an account with a $399.00 annual fee to allow hotlink. More information is available at: this link.
    Dismiss Notice
  3. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  4. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  5. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  6. Dismiss Notice
  7. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Phasal Transporter - How does it work code wise?

Discussion in 'CivBE - General Modding Discussion' started by Syrkres, Mar 8, 2016.

  1. Syrkres

    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.
     
  2. Syrkres

    Syrkres Chieftain

    Joined:
    Mar 3, 2016
    Messages:
    95
    Location:
    Mass
    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).
     
  3. Syrkres

    Syrkres Chieftain

    Joined:
    Mar 3, 2016
    Messages:
    95
    Location:
    Mass
    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,
     

Share This Page