Resurrecting the Necro

Everything about mods can be found here.

Moderator: Morax

Resurrecting the Necro

Postby neagix » 12 May 2020, 09:15

Hi there

I am relatively new to FA(F) and modding but yesterday I decided to fix the broken Necro bot from mod DB, inspired by the Total Annihilation Necro bot.

Repository of the mod:

https://github.com/neagix/faf-necro

You can download as a zip and install it under your documents folder:
My Games/Gas Powered Games/Supreme Commander Forged Alliance/Mods/necro


What works:
  • resurrection of land/air/ship wreckage (no buildings or experimentals, by design)
  • resurrected units start with 1/10th of ReclaimLeft*MaxHealth
  • start repair right after resurrection

What needs to be fixed:
  • build/repair/reclaim animation (the original model was copied from vanilla FA I suppose, and it's broken) partially fixed
  • icon placeholder thanks to @Uveso
  • orientation of resurrected unit does not match original (perhaps not possible to fix?)
  • airplanes are spawned in flight
  • use a BuildRate of 2 for reclaim and a faster speed for repair (right now it uses 2 for both)
  • use a bipedal unit design like the original Necro?

I am looking for someone that can help me with the above, thanks! You can also use the GitHub repo.
Last edited by neagix on 14 May 2020, 01:01, edited 5 times in total.
User avatar
neagix
 
Posts: 7
Joined: 12 May 2020, 08:29
Has liked: 5 times
Been liked: 0 time

Re: Resurrecting the Necro

Postby biass » 12 May 2020, 09:18

Map thread: https://bit.ly/2PBsa5H

Petricpwnz wrote:biass on his campaign to cleanse and remake every single map of FAF because he is an untolerating reincarnation of mapping hitler
User avatar
biass
Contributor
 
Posts: 2239
Joined: 03 Dec 2015, 07:54
Has liked: 598 times
Been liked: 662 times
FAF User Name: biass

Re: Resurrecting the Necro

Postby Uveso » 12 May 2020, 20:29

@neagix

i have fixed some issues:

Removed unused version folder
Moved icon folder to the right place
Moved units out of the hook folder.
Fixed icon background
Fixed IconSortPriority
Fixed SelectionPriority
Fixed wrong class names
Added Seraphim and Nomads necro
Reduced mod size from 2.96 MB to 0.95 MB
(using model and shader from the original unit)

Pull request is up:
https://github.com/neagix/faf-necro/pull/1
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Re: Resurrecting the Necro

Postby neagix » 12 May 2020, 22:35

Uveso wrote:i have fixed some issues:


Thanks! I thought this was possible but I could not do it myself.

I noticed that the new units you added have a correct animation for building/repairing/reclaiming but the Terran one does not. Is it because the original script has wrong bones definitions?

On a different topic: would it be possible to make the various AIs use these units? I wonder if there is some function to hook to.
User avatar
neagix
 
Posts: 7
Joined: 12 May 2020, 08:29
Has liked: 5 times
Been liked: 0 time

Re: Resurrecting the Necro

Postby Uveso » 13 May 2020, 02:14

Yes you can make the AI use these units.
You need to create a a platoontaplate for the units.
Then you need to make a platoonbuilder to build the units.
And you need an AI plan to move those units around.

But there are still some problems to solve in your mod.

If 2 necros revive a singe unit that you get 2 brand new units.
This was prevented in the original mod by checking the position of the new unit. (hook in unit.lua)

Also if you revive then you get the recource from the reclaim plus reviving the unit.
So i would destroy and revive units all the time for a nice eco cheat.

And if you revive experiementals (or any other unit) they spawn always with 100% healt,
no matter how much mass i already reclaimed from the wreck.
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Re: Resurrecting the Necro

Postby neagix » 13 May 2020, 09:13

Uveso wrote:Yes you can make the AI use these units.
You need to create a a platoontaplate for the units.
Then you need to make a platoonbuilder to build the units.
And you need an AI plan to move those units around.

Thanks, will look into this.

Uveso wrote:If 2 necros revive a singe unit that you get 2 brand new units.
This was prevented in the original mod by checking the position of the new unit. (hook in unit.lua)

I missed this. Good catch.

Uveso wrote:Also if you revive then you get the resource from the reclaim plus reviving the unit.
So i would destroy and revive units all the time for a nice eco cheat.

I need to think how to solve this. Might be tricky.

Uveso wrote:And if you revive experimentals (or any other unit) they spawn always with 100% health,
no matter how much mass i already reclaimed from the wreck.

Did you try the mod? Experimentals are not allowed; no unit spawns with 100% health.
User avatar
neagix
 
Posts: 7
Joined: 12 May 2020, 08:29
Has liked: 5 times
Been liked: 0 time

Re: Resurrecting the Necro

Postby Uveso » 13 May 2020, 11:43

neagix wrote:Did you try the mod? Experimentals are not allowed; no unit spawns with 100% health.


You are right, it was the shield at 100% not the health bar.
And yes i tested it.

10 necros working on a fatboy wreck:
necro1.png
necro1.png (232.2 KiB) Viewed 1513 times


and after reviving the experimental:
necro2.png
necro2.png (523.61 KiB) Viewed 1513 times



[edit]
Code: Select all
self.RecBP.CategoriesHash.EXPERIMENTAL

This does not work.
spec.AssociatedBP (self.RecBP) is holding only the blueprintID, not the blueprint data.

hint:
Code: Select all
__blueprints[spec.AssociatedBP].CategoriesHash.EXPERIMENTAL
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Re: Resurrecting the Necro

Postby neagix » 13 May 2020, 12:52

Uveso wrote:
neagix wrote:Did you try the mod? Experimentals are not allowed; no unit spawns with 100% health.

And yes i tested it.

You are right, I thought the changes I did were working but they are not!

Uveso wrote:[edit]
Code: Select all
self.RecBP.CategoriesHash.EXPERIMENTAL

This does not work.
spec.AssociatedBP (self.RecBP) is holding only the blueprintID, not the blueprint data.

hint:
Code: Select all
__blueprints[spec.AssociatedBP].CategoriesHash.EXPERIMENTAL

Thanks, this needs to be fixed. You can make a PR if you like (for attribution).

Right now this is just a pet project, if AI can use them with some reasonable strategy then it then it would be more interesting.
User avatar
neagix
 
Posts: 7
Joined: 12 May 2020, 08:29
Has liked: 5 times
Been liked: 0 time

Re: Resurrecting the Necro

Postby neagix » 14 May 2020, 01:00

I have done some fixes:

  • disallow buildings/experimentals resurrection
  • fix bug with multiple spawns
  • give only 1 mass and 1 energy upon reclamation
  • shield and fuel set to 0 after resurrection

I could not figure out yet how to set aircrafts to landed upon respawning, and unfortunately I don't think I can copy the pose of the wreckage to the new unit unless somehow I can create it when the wreckage still exists and hide it for a while...
User avatar
neagix
 
Posts: 7
Joined: 12 May 2020, 08:29
Has liked: 5 times
Been liked: 0 time

Re: Resurrecting the Necro

Postby Northern-Newbie » 30 Jul 2020, 20:11

I know my Answer comes quite late indeed but Uveso has already more or less repaired an Version of the Necro Mod provided by me from the Old Vault

We still need to have someone work on it and make some Balance Adjustments cause of the way we solved the Problems the Mod had and we also are in quite the need of some Models which arent literally just copied Engineers fromt he Factions
Northern-Newbie
 
Posts: 3
Joined: 30 Jul 2020, 19:45
Has liked: 0 time
Been liked: 0 time
FAF User Name: Northern-Newbie

Next

Return to Mods & Tools

Who is online

Users browsing this forum: No registered users and 1 guest