Forged Alliance Forever Forged Alliance Forever Forums 2017-01-16T17:15:17+02:00 /feed.php?f=41&t=13834 2017-01-16T17:15:17+02:00 2017-01-16T17:15:17+02:00 /viewtopic.php?t=13834&p=142181#p142181 <![CDATA[Re: How do I add unit descriptions?]]>
Thanks for all the help, guys.

Statistics: Posted by Tanksy — 16 Jan 2017, 17:15


]]>
2017-01-15T21:27:33+02:00 2017-01-15T21:27:33+02:00 /viewtopic.php?t=13834&p=142130#p142130 <![CDATA[Re: How do I add unit descriptions?]]> Statistics: Posted by Sprouto — 15 Jan 2017, 21:27


]]>
2017-01-15T20:41:21+02:00 2017-01-15T20:41:21+02:00 /viewtopic.php?t=13834&p=142127#p142127 <![CDATA[Re: How do I add unit descriptions?]]> /viewtopic. ... ns#p134924

Uveso came to the rescue in September. We can't use capital letters in the unitdescription.lua file because supcom hates us.

I just tested this format with my stuff and it worked:
Code:
Description['daa201'] = "Inspired by the UEF Deadbolt, the locust is an air based emp-platform. The locust relies on anti-gravity drives and gentle propulsion to direct its motion. Unable to ground itself, the unit fires infrequently and the effect is short lived."


Edit: Oops; I also didn't need any of the <LOC ...> tags in my unit blueprints, and didn't need the string_dp.lua file!

Statistics: Posted by Dudekahedron — 15 Jan 2017, 20:41


]]>
2017-01-15T20:26:07+02:00 2017-01-15T20:26:07+02:00 /viewtopic.php?t=13834&p=142126#p142126 <![CDATA[Re: How do I add unit descriptions?]]>

I'm also having trouble with this, and I'm not sure what parts of this thread work and don't.

In unit.bp do we need the <LOC unitname_desc>, <LOC unitname_help>, and <LOC unitname_name> ?
Do we need hook/loc/strings_db.lua?

I was looking through BrewLan (I don't have the newest blackops yet) and noticed that Balthazar used a totally different set of numbers in unitdescription.lua and strings_db.lua:
from unitdescription.lua:
Code:
Description['saa0105'] = "<LOC Unit_Description_BrewLAN_T1A001>Light Guship. Primary role is base defense. Effective against low-level ground units."

from strings_db.lua:
Code:
sair0105="Light Gunship" -- no idea what this is for
saa0105_name="Respirer"
Unit_Description_BrewLAN_T1A001="description here"

Statistics: Posted by Dudekahedron — 15 Jan 2017, 20:26


]]>
2017-01-15T10:26:58+02:00 2017-01-15T10:26:58+02:00 /viewtopic.php?t=13834&p=142112#p142112 <![CDATA[Re: How do I add unit descriptions?]]>
I don't know why but for me Blackops system didn't work either.

Try this :
Code:
['TANKSYUNIT'] = "Test.",


Don't forget the coma at the end.

It worked for me, I hope it works for you.

Statistics: Posted by Krapougnak — 15 Jan 2017, 10:26


]]>
2017-01-15T01:53:47+02:00 2017-01-15T01:53:47+02:00 /viewtopic.php?t=13834&p=142099#p142099 <![CDATA[Re: How do I add unit descriptions?]]>
Just from a quick lookover your post -- note that the hooked file should be called 'unitdescription.lua' rather than the plural that you used in your post.

Of course, I assume that 'TANKSYUNIT' is the unit ID from both the blueprint AND script of the unit.

Don't let the <LOC> tags get you confused. If it's easier - just assume they aren't there at all - they are only used to translate one language to another and have no bearing on the basic function.

The in-unit descriptions you have already worked out -- the Description is just the basic name of the unit, and the HelpText entry seems to be used primarily by the Unit Console for directly spawning in units (cheat mode). The additional descriptions that go with the factory build rollover come from the Display section of the blueprint, specifically the Abilities field. For example;

Display = {
Abilities = { 'Suicide Weapon' },
}


I hope this helps.

Statistics: Posted by Sprouto — 15 Jan 2017, 01:53


]]>
2017-01-14T17:31:21+02:00 2017-01-14T17:31:21+02:00 /viewtopic.php?t=13834&p=142069#p142069 <![CDATA[How do I add unit descriptions?]]>
Code:
Description['TANKSYUNIT'] = "Test."


which is how BlackOps have entries in their file. Frustratingly, in-game this doesn't show up. I compared with a BlackOps unit ".bp" file, and they have;

Code:
Description = "<LOC unitname_desc> Unit Name"


And further on in the file;

Code:
HelpText = "<LOC unitname_help> Unit Name"
.

I tried to look into LOC, and have a file in hook/loc/US/ called strings_db.lua, with an entry such as:

Code:
TANKSYUNIT_desc="Test."
TANKSYUNIT_help="Test."


and then in my own unit's .bp file I put the Desc and Help to use "<LOC TANKSYUNIT_desc>" and "<LOC TANKSYUNIT_help>" in the appropriate places. In-game is still no dice. "Description" changes the tiny little box that appears when you hover over the icon of the unit, but there is still no descriptive white-text appearing in the box underneath the abilities.

Further studying BlackOps' unitdescriptions.lua file, half of their entries begin with "<LOC Unit_Description_20000##>", so I have done just that. Now my unitdescriptions file reads:

Code:
Description['TANKSYUNIT'] = "<LOC Unit_Description_Tanksy>Test."


and my strings_db.lua file has been updated to have a "Unit_Description_Tanksy="Test." field.

Why is nothing working for me, but even less effort works fine for everyone else? What am I doing wrong, when I've been carefully making sure to be doing the same as everybody else?

Statistics: Posted by Tanksy — 14 Jan 2017, 17:31


]]>