Logo Platform
logo amplifiers simplified

New units (Need help!)

Reply
Copied to clipboard!
9 years ago
Dec 6, 2015, 8:03:52 PM
Hello there,



I've created a new units called the explorer in my mod and I followed every single tutorial and examples amplitude gives us. Everything's working fine for definitions of the units itself. Description, Stats, model and even the small image show in the game...but the skin of the unit always appear purple whatever I do.



Here is my mod from the workshop

Horizon.rar



Here is an example of what's happening in game





This is the error I get when trying to customize the equipment of the new unit





Here is the log that results from the error





I don't understand what I'm doing wrong...I spend hours and hours reading my code all over again and everything's fine. I'm comparing it over and over again with the examples SwapModels and NewUnits from the tutorials and everything seems to be the same. I really need help!
0Send private message
9 years ago
Dec 6, 2015, 10:30:06 PM
Looks like it doesn't have a skin, alright. You seem to be using the wrong method/language in your file. See this line:

[code]

[/code]

I forget the exact details, but this works when you have something like "CustomMappingBrokenLordsMilitia" or some such. The second half of the name has to be an existing unit. Since you've defined a new unit, the "explorer", it's trying to look for a unit that doesn't exist to substitute.



Try using the remapping.xml method found over here /#/endless-legend/forum/15-modding/thread/5780-unit-reskin-tutorial

I suspect that you can use the remapping.xml to define all attributes of a new unit, with no dependency on existing units, which should solve your problem and also let you not mess around with the mapping.xml.



That might work?
0Send private message
9 years ago
Dec 7, 2015, 12:19:32 AM
I understand what you're saying, but the unit reskin tutorial is to add your own skin to existing or new units. I don't want that...I don't have any .png files to put in a textures folder. I want my new units to have the same skin as a Militia or Settler. I actually followed this NewUnit.rar when I first started to create everything with my mod. I literally copied everything inside it and change only a few things so the names and parameters are for my explorer units (more vision, less attack, less hp, etc.). I feel like you are probably right with the remapping solution, but what do I need to write so my units takes the same skin as a Militia for example.



I'm reading again the Modding Tutorial here and what I want to do is exactly "Add a new unit with a dedicated model" but with an already existing model. It should be simple...
0Send private message
9 years ago
Dec 7, 2015, 12:27:22 AM
Yes, but the mapping code reads the name of the unit and uses that to determine which model files to use. By changing the naming convention to your own, you've made it so that the mapping code can't find the model you want for it. You could rename it to CustomMappingBrokenLordMilitia, or whatever it is, and then it'll work. The alternative is to 'start over' and redefine an entirely new unit. To do that you would have to export the current militia's skin and model, then re-add it as a new one for your Explorers. It'd be the same, but a new copy.
0Send private message
0Send private message
9 years ago
Dec 7, 2015, 6:07:54 PM
After I took some times to read and understand the remapping.xml , I tried it using this code:



[CODE]



Textures/CH_BLord_Militia_DIFF.png

Textures/CH_BLord_Militia_NORM.png





[/CODE]



I also modified the mapping.xml. I added a new line and changed the BodyDefinitionName section into it.



[CODE]





















[/CODE]



Didn't seems to work. I feel like the solution is in the remapping.xml. Problem, the tutorials from Amplitude aren't explaining the specific thing I want to do. I think it has something to do with the material data or the path. How can I use an already existing MaterialData from another unit and use it for another UnitBody.



Also, I don't know why, but in-game, when using the console command /UnitBodyInspector, none of my UnitBody I created are shown in the list, when they show in-game (strange?).



My problem persist, can't achieve to put a skin on the new unit I defined. How did Amplitude manage to create a new unit without any remapping.xml in that mod? : http://forums.amplitude-studios.com/attachment.php?attachmentid=16587&d=1426863900
0Send private message
9 years ago
Dec 8, 2015, 2:09:45 PM
Hello,



I'm just dropping a line to confirm that the problem is with the name of the CustomMapping. Not with the remapping.xml which was correct.

It must end with the unitbody descriptor of the creature you want to see the model of.

In your case, it will be CustomMappingUnitBodyBrokenLordsMilitia.



Don't hesitate to inform us if you still have issues.

Cheers,
0Send private message
0Send private message
9 years ago
Jan 10, 2016, 11:12:00 AM
Hey, just wanna say thanks for this thread, helped me a lot.



As I'm about to create my own mod, I just wanted to know if it's possible to change the order of the custom units. So that the explorer in this case appears as second unit f.e. in the menu and not as the last one.



Thanks in advance

Si
0Send private message
9 years ago
Jan 19, 2016, 6:26:02 PM
Hello there o/

Im having exactly the same problem with my mod, where did you change the CustomMappingUnitBodyBrokenLordsMilitia line?
0Send private message
9 years ago
Jan 20, 2016, 11:08:27 AM
You could subscribe to his mod on steam workshop, and then go peek through the files to learn how he did it (maybe search a bunch of files for that line). That's what I would probably do if I needed to figure something out. Hope that helps a little. <3
0Send private message
0Send private message
9 years ago
Jan 20, 2016, 3:11:35 PM
They go into: steamapps(wherever that is for you)\workshop\content\ and then there are number folders. It'll be in one of those folders.
0Send private message
?

Click here to login

Reply
Comment