How to add new custom unit???

Everything about mods can be found here.

Moderator: Morax

How to add new custom unit???

Postby bluelaser » 05 Feb 2020, 14:25

I copy some unit file and rename it. I edit the name and class name in script.lua , and edit the Categories and FactionName in bp file. Add the icon file.
But when I enable this mod and enter the game and open the factory build UI,I found the custom unit is missing . I learn the structure of blackops mod and add custom unit folder with lua file. But the mod still didn't work. I go to study the TotalMayhem mod files and add the hook lua files(gamecommon.lua,unitview.lua and uiutil.lua), then fail agin...
Pleaser help me!
bluelaser
 
Posts: 2
Joined: 02 Feb 2020, 15:55
Has liked: 0 time
Been liked: 0 time
FAF User Name: bluelaser

Re: How to add new custom unit???

Postby nine2 » 05 Feb 2020, 14:49

Uveso in 3 ... 2 ...
nine2
Councillor - Promotion
 
Posts: 2416
Joined: 16 Apr 2013, 10:10
Has liked: 285 times
Been liked: 515 times
FAF User Name: Anihilnine

Re: How to add new custom unit???

Postby bluelaser » 05 Feb 2020, 15:30

Anihilnine wrote:Uveso in 3 ... 2 ...


Your lauch is failed.
bluelaser
 
Posts: 2
Joined: 02 Feb 2020, 15:55
Has liked: 0 time
Been liked: 0 time
FAF User Name: bluelaser

Re: How to add new custom unit???

Postby Uveso » 05 Feb 2020, 17:47

Hello bluelaser,

welcome to the FAForever forum :)

It's hard to say what's wrong with your unit. without seeing the code and blueprint.

If you want, you can upload your mod and i will take a look at it.
In case you are sure the mod is working you can also just upload the unit (folder).
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: How to add new custom unit???

Postby speed2 » 05 Feb 2020, 17:47

Post the mod, then (Uveso :D ) can look at it and tell you what you did wrong

EDIT: Ninja'd by the master...
User avatar
speed2
Contributor
 
Posts: 3189
Joined: 05 Jan 2013, 15:11
Has liked: 636 times
Been liked: 1119 times
FAF User Name: speed2

Re: How to add new custom unit???

Postby DDDX » 11 Feb 2020, 00:19

when a unit is missing completely, that probably means one thing - error in the blueprint file. The engine can forgive an error in the script file ( the unit will be there but the script part will not be working), but if the blueprint is corrupted (for example, you forgot to put a , where there should be one), then you will not see the unit at all.
This can easily be detected by looking at the log-there will be a warning concerning your unit, saying which file for that unit did not load, and the line number where that error is located within the file that did not load.
Check out my 2 maps: "Survival_Mayhem&BO_3d_v1" "Survival_Mayhem&BO_3d_RPG"
as well as my mod: "Survival Mayhem&BO balance"
-- let me know of any bugs or issues regarding those 3.
DDDX
Avatar-of-War
 
Posts: 170
Joined: 21 Mar 2016, 16:13
Has liked: 18 times
Been liked: 16 times
FAF User Name: DDDX


Return to Mods & Tools

Who is online

Users browsing this forum: No registered users and 1 guest