Special embarked graphics

PawelS

Ancient Druid
Joined
Dec 11, 2003
Messages
2,811
Location
Poland
I have two questions concerning the embarked unit graphics that some civs (like Denmark and Polynesia) use:

1. What determines which civs get which embarked graphics?

2. Would it be possible to convert them to true units? I think a Longboat unit would be cool :)
 

Gedemon

Modder
Super Moderator
Joined
Oct 4, 2004
Messages
10,980
Location
France
1/ seems harcoded, but maybe I haven't looked hard enough :think:

edit: there is player:SetEmbarkedGraphicOverride("ART_DEF_UNIT_U_SPANISH_GALLEON") in DLC02 so you can do what you want in a mod I suppose, even if for the vanilla game it really seems hardcoded

2/ yes, should work by creating a new units using the art define ART_DEF_UNIT_U_DANISH_LONGBOAT
 

PawelS

Ancient Druid
Joined
Dec 11, 2003
Messages
2,811
Location
Poland
If anyone made this unit I would love to have it.

I haven't made this unit yet, but I'm going to do it for my mod.

Since I am doing a scenaro with multiple viking civs if the code for embarkation has been done I would love to get that too as a template. I do not know anything aboui sql. So I guess I may have to learn a bit...

It's not SQL, it's LUA. To enable embarked graphics for a civ you should use
Code:
player:SetEmbarkedGraphicOverride("ART_DEF_UNIT_U_DANISH_LONGBOAT")

But you need to know the basics of LUA modding first, I think you can find some tutorials about it at this forum.
 

PawelS

Ancient Druid
Joined
Dec 11, 2003
Messages
2,811
Location
Poland
The unit is easy to make - I took an existing unit (Trireme), and changed its UnitArtInfo to ART_DEF_UNIT_U_DANISH_LONGBOAT.

The unit is displayed as two longboats (when at full health), like the embarked graphics, changing it to single unit would require some manipulation in the art defines. The combat animations work. There is no icon or unit portrait provided, currently I use the same icon and portrait as for Trireme.
 

whoward69

DLL Minion
Joined
May 30, 2011
Messages
8,641
Location
Near Portsmouth, UK
... changing it to single unit would require some manipulation in the art defines.

This gets "easier" with the next release (1.0.1.674) as unit art stuff is loaded from the database
 

Gedemon

Modder
Super Moderator
Joined
Oct 4, 2004
Messages
10,980
Location
France
Which is also much more user friendly concerning compatibility between mods. But every mods using new units will need an update for the next patch.
 

Pazyryk

Deity
Joined
Jun 13, 2008
Messages
3,584
I hope folks don't mind if I hijack this thread to ask a totally unrelated question (I didn't want to start a new thread):

Does anyone know if iUnit is preserved when units embark and disembark?
 

whoward69

DLL Minion
Joined
May 30, 2011
Messages
8,641
Location
Near Portsmouth, UK
A very small test sample (two units, both embarked/disambarked) says "Yes"
 
Top Bottom