Phobos icon indicating copy to clipboard operation
Phobos copied to clipboard

Mobile Refinery Logic

Open NetsuNegi opened this issue 2 years ago • 20 comments

Just like reopen PR#707

  • Units can convert the ore underneath them into cash in real time, like GDI's EPIC unit MARV in Command & Conquer 3 Kane's Wrath, when MobileRefinery is true.
    • This logic cannot work on buildings.
  • MobileRefinery.TransDelay specifies the interval in game frames between two mining "processes".
    • MobileRefinery.AmountPerCell controls how many "bails" of ore can be mined at each cell at once.
    • By default, ore mined this way is worth the same as if it was harvested and refined the normal way. This can be adjusted with MobileRefinery.CashMultiplier.
  • MobileRefinery.Display=true will create a flying text displaying the total cash amount received each mining process. MobileRefinery.Display.Houses controlls who can see this text.
  • An animation will be played at each interval at each mined cell. If MobileRefinery.Anims contains 8 entries, then an entry will be picked according to unit facing. Otherwise, an entry will be chosen at random.
    • If MobileRefinery.AnimMove=true, the animations will move with the unit.

in rulesmd.ini

[SOMETECHNO]                       ; InfantryType, UnitType or AircraftType
MobileRefinery=false               ; boolean
MobileRefinery.TransDelay=30       ; integer
MobileRefinery.CashMultiplier=1.0  ; float
MobileRefinery.AmountPerCell=0     ; integer
MobileRefinery.FrontOffset=        ; list of integer, use cell as unit, multiple values mean that they are effective in multiple cells at the same time
MobileRefinery.LeftOffset=         ; list of integer, use cell as unit, multiple values mean that they are effective in multiple cells at the same time
MobileRefinery.Display=true        ; boolean
MobileRefinery.Display.Houses=all  ; AffectedHouse enumeration
MobileRefinery.Anims=              ; list of animations
MobileRefinery.AnimMove=true       ; boolean

mobile-refinery

NetsuNegi avatar Jul 22 '23 16:07 NetsuNegi

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

github-actions[bot] avatar Jul 22 '23 16:07 github-actions[bot]

The game seems to be ignoring anything i put under MobileRefinery.TransRate= and MobileRefinery.AmountPerCell=. Only defaults are used.

mevitar avatar Jul 23 '23 14:07 mevitar

The game seems to be ignoring anything i put under MobileRefinery.TransRate= and MobileRefinery.AmountPerCell=. Only defaults are used.

I'll check it later

NetsuNegi avatar Jul 23 '23 14:07 NetsuNegi

The game seems to be ignoring anything i put under MobileRefinery.TransRate= and MobileRefinery.AmountPerCell=. Only defaults are used.

Sorry, I provided a wrong ini flag XD

NetsuNegi avatar Jul 24 '23 01:07 NetsuNegi

The game seems to be ignoring anything i put under MobileRefinery.TransRate= and MobileRefinery.AmountPerCell=. Only defaults are used.

Correct flags is "TransDelay"

NetsuNegi avatar Jul 24 '23 01:07 NetsuNegi

I still can't get MobileRefinery.AmountPerCell= to work. MobileRefinery.Display.Houses= also does nothing, "none" and "enemies" still display cash for the owner. All other tags seem to work fine.

mevitar avatar Jul 24 '23 22:07 mevitar

I still can't get MobileRefinery.AmountPerCell= to work. MobileRefinery.Display.Houses= also does nothing, "none" and "enemies" still display cash for the owner. All other tags seem to work fine.

Display.House is correctly flag, docs has fixed. AmontPerCell is tiberium amount, not the money amont. How much did you set ?

NetsuNegi avatar Jul 26 '23 01:07 NetsuNegi

AmontPerCell is tiberium amount, not the money amont. How much did you set ?

Well, 1. And 3. And 16. And 100. And 160. Yet no matter what i set, the display still shows the same amount of cash (as if harvested 1 stage of tiberium).

mevitar avatar Jul 26 '23 20:07 mevitar

AmontPerCell is tiberium amount, not the money amont. How much did you set ?

Well, 1. And 3. And 16. And 100. And 160. Yet no matter what i set, the display still shows the same amount of cash (as if harvested 1 stage of tiberium).

It should be fixed now.

NetsuNegi avatar Jul 27 '23 00:07 NetsuNegi

Everything seems to be working now.

mevitar avatar Jul 27 '23 13:07 mevitar