Skip to content

Conversation

@Otamaa
Copy link
Contributor

@Otamaa Otamaa commented Apr 24, 2021

Anim Create Unit

https://i.imgur.com/Stnz6Vu.gif

  • Be caution that Animation usually had no Owner will create unit with Civilian Owner insted. https://i.imgur.com/0Ox6zGN.gif
    -Using Unit DestroyAnim is mostly recomended since it got rewritten for this purpose.

In rulesmd.ini:

[SOMEUNIT]                                    ; UnitType , source unit
StoreDeathFacingsForAnim=	        ; boolean , store this unit facing for Anim Create unit
DestroyAnim=				; list of animatioms played after unit destroyed
DestroyAnim.Random=                  ; boolean , if `No` and DestroyAnim item is more than 8 , DestroyAnim selected depend on the DestroyAnim count % 2 * facing , default to yes

In artmd.ini:

[SOMEANIM]					       ; AnimationType
CreateUnit=					       ; UnitType to create
CreateUnit.Facing=			               ; short ,Unit Facing 0-255 or -1 random
CreateUnit.UseDeathFacings=               ; boolean , Use source unit DeathFacings
CreateUnit.UseDeathTurrentFacings =  ;  boolean , Use source unit Turrent Facings
CreateUnit.RemapAnim=                      ; boolean , remap anim to source unit color
CreateUnit.Mission=			      ; Missions , Default to Guard
CreateUnit.Owner=                               ;enumeration invoker|killer|victim|civilian|special|neutral|random

##Note :

  • Proper CreateUnit.Owner is only applicable when Source Unit is killed by Take Damage function of the game.
  • Due to certain game bug(s) some tag now are removed and internal function(s) is reworked
  • Cannot create Unit on Air Anymore due to game not properly updating its coord after unlimboed causing unit fall to death
  • Disabling Turrent Facing reset come on separate feature

@github-actions
Copy link

github-actions bot commented Apr 24, 2021

Nightly build for this pull request:

@Otamaa Otamaa force-pushed the feature/AnimToUnit branch from cf19674 to 61d8353 Compare April 24, 2021 20:07
@AutoGavy
Copy link

666 good decompiler

Otamaa added a commit to Otamaa/Phobos that referenced this pull request May 5, 2021
* Implementing RadType Enumeration

* Bug fix

Multiple RadSite on same area causing inf play mutiple death animation/generating multiple UnitToInf

* New Instances without Rely on Wepon

experimental stuffs , it breaks Inf_AIDeploy_Check rad fix

* Attempt to fix some  known vanilla bugs

-Deso cannot fire his weapon when cloaked (partialy fixed)
-Unit with Death Weapon able to die twices (not affect yet)

* Re-Cloak Deso when Undeployed

-Deso cannot fire his Deploy weapon when cloaked (fixed)

* Further changes

* Removing unnessesary codes , fix some style , Doc

* Refactorings

Co-authored-by: Meta (X230T) <crabiter@vivaldi.net>
Force C4Warhead PenetratesShield

Fix shield SL issue

Small refactor; version bump


Change the check back to vanilla

implement AnimList.PickRandom

use ternary operator

update for AnimList.PickRandom
update code style

Fix magnetron issue Phobos-developers#195 (Phobos-developers#200)


Fix ranged mc desync (Phobos-developers#199)

* Attempt to fix desync

* Remove the check for player
A pair of braces


Bump version


Remove `the Forgotten`

Separate HP and cloak check of shield anim

Fix lost HP check

Contributing guidelines started; Git branching model info


Skip the low damage check when techno has shield

STUPID WW!!!!!
closes Phobos-developers#204
First iteration of the styleguide
Otamaa added a commit to Otamaa/Phobos that referenced this pull request May 5, 2021
@Belonit Belonit force-pushed the develop branch 2 times, most recently from ea3320f to 6d739d5 Compare May 29, 2021 21:50
@Otamaa Otamaa force-pushed the feature/AnimToUnit branch from c0b1869 to a951deb Compare June 15, 2021 06:33
@Metadorius Metadorius force-pushed the feature/AnimToUnit branch from a951deb to 302a1ae Compare June 15, 2021 12:41
Co-authored-by: Otamaa <otamaindodapuq2@gmail.com>
Otamaa added 3 commits July 14, 2021 03:30
-Add AnimExt
-Add hook for UnitClass_TakeDamage
-Add some more misc function
-Calculate DestroyAnim index to be used on Unit Source Facings and DestroyAnim count
-Remove ability to create unit on air and some tags , due to bug(s)
-No proper Doc's  Yet !
@Thrifinesma Thrifinesma force-pushed the develop branch 3 times, most recently from 93a2e8b to c43f8e8 Compare July 19, 2021 03:29
@Otamaa Otamaa force-pushed the feature/AnimToUnit branch from af20fbe to 50eea51 Compare July 27, 2021 18:32
-Receivedamageargs.HouseSource giving corrupt data causing crash
@Otamaa Otamaa force-pushed the feature/AnimToUnit branch from 50eea51 to d7847d8 Compare July 27, 2021 18:42
Otamaa added 2 commits July 28, 2021 03:13
-Change it to DTOR (Hopefully no issue this time)
@Otamaa Otamaa force-pushed the feature/AnimToUnit branch from f83f4bc to c271e17 Compare July 29, 2021 22:01
Copy link
Member

@Metadorius Metadorius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Work's good, we can merge this after addressing some concerns.

Comment on lines 75 to 77
int aFacing = pTypeExt->CreateUnit_Facing.Get();
aFacing = aFacing > 255 ? 255 : aFacing;
aFacing = aFacing <= -1 ? ScenarioClass::Instance->Random.RandomRanged(0, 255) : aFacing;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code can be simplified if we introduce a separate tag to control whether the facing is random.

Comment on lines 20 to 21
Valueable<bool> CreateUnit_UseDeathFacings;
Valueable<bool> CreateUnit_UseDeathTurretFacings;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does splitting this into two tags have some use? I feel like we should squash those tags into one and name it CreateUnit.InheritFacings.

Metadorius and others added 4 commits July 30, 2021 15:24
-Add `unsigned short` for TemplateDef.h
-UseDeathFacings -> InheritFacings
-UseTurretDeathFacings-> inheritTurretFacings
@Metadorius Metadorius merged commit 2e35a99 into Phobos-developers:develop Jul 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants