Page 1 of 4

Custom Command Posts (FAQ)

Posted: Thu Feb 19, 2009 12:42 am
by FragMe!
From helping in the Flags as CP topic I started playing around with the CP's and have come up with a few novel things. Note this just changes the CP it does not change the unit selection screen icon as well for that please view this topic Custom Ingame.lvl


This is an excerpt from the "Add An Era.txt" included with 1.3 patch about setting up custom holo geometry:
Hidden/Spoiler:
[quote="Zerted"]7) Create your CP holo icon meshes. You can start from scratch or build off of an existing one like Common/mshs/com_icon_cis.msh. If needed, don't forget to create the msh's .option file too.
8.) The custom CP holo icons go in Common/mshs/. Depending on your team name mappings, each icon should have one of the following names: com_icon_alliance, com_icon_imperial, com_icon_republic, or com_icon_CIS. If your map is CTF based, you might also want to look into com_icon_swap.
9) Open Common/ingame.req and wipe everything out. We since are going to be creating a custom ingame.lvl for this map, we only want to override the elements which have been changed. If you try to include everything the game might crash, but you would also override any other ingame.lvl mods the user might have installed.
10) Put the following code in Common/ingame.req. Make sure to adjuest it for your team names. The example uses a SetupTeams section with 'all' and 'imp' team names:

ucft
{
REQN
{
"model"
"com_icon_alliance"
"com_icon_imperial"
}
}

11) Munge Common
12) In data_LVL/_LVL_PC, rename the new ingame.lvl to "y_con-ingame.lvl". The 'y_con' part stands for the Y era and game mode Conquest. The renaming is not required, but should be done if you want to override the icons with different icons in other era/game modes of your map.
13) In Common/scripts/LVL/LVLy_con.lua, add "ReadDataFile("dc:y_con-ingame.lvl")" right before the non-'dc:' version of the line. This tells the game to read your map's ingame.lvl before reading the default ingame.lvl. Since your ingame.lvl is read first, its CP icons will be the ones used.
14) You will need to remember to manually copy the munged data_LVL/_LVL_PC/y_con-ingame.lvl to your munged map's GameData/addon/LVL/data/_LVL_PC/ folder any time you need to create a new y_con-ingame.lvl. A 'normal' mod map does not have a custom ingame.lvl, so VisualMunge will not move it for you. Do that copy now, so you don't forget to later.
15) Rename Common/ingame.req to "y_con-ingame.req". This is so you always have a copy of the req that created the y_con-ingame.lvl. If you want to make a new y_con-ingame.lvl, rename that file back to "ingame.lvl". VisualMunge does not build custom named lvls by you just creating a differently named req file.
16) Test your map[/quote]


Now to the fun stuff, you can use any geometry as the command post as well as any geometry for the HoloImageGeometry. I will go through a couple of examples.
First just to change the Holo geometry only:
1) Choose or create your geometry, make sure it is centered around the x,y,z axis in XSI if you are creating one. Export it.
2) Copy from the common directory the com_bldg_controlzone.odf file to your world's odf folder.
3) Rename it to something you like, in my example I called it com_bldg_ftr_controlzone.
4) Open the file and change the appropriate parts for the Hologeometry for the teams.
Hidden/Spoiler:
[GameObjectClass]
ClassLabel = "commandpost"
GeometryName = "com_bldg_controlzone.msh"
GeometryScale = 1.0


[Properties]
SwitchClassRadius = "5.0"
BUILDINGSECTION = "BODY"

Label = "Control Zone"

NeutralizeTime = 12.0
CaptureTime = 10.0

MapTexture = "hud_flag_icon"
MapScale = 2.5
GeometryName = "com_bldg_controlzone"
HoloOdf = "com_holo_ftr_controlzone"
HoloImageGeometry = "xwing_flag alliance"
HoloImageGeometry = "tie_flag empire"
HoloImageGeometry = "com_icon_republic republic"

HoloImageGeometry = "com_icon_CIS CIS"
HoloTurnOnTime = 2.2
In this example I changed the alliance and empire geometry and these are the results:
Hidden/Spoiler:
Image
Hidden/Spoiler:
Image
I did do some scaling and changes in XSI just in case you were wondering.
If you are going to do custom models I suggest a grey scale (monochrome) texture it works better for the holo.

To use a different CP object and hologeometry:
This is the same type of thing but removing the holo glow from the CP and therefore allowing color on your objects.
Follow the steps indicated above but this time also copy and rename the com_holo_controlzone.odf file.
Make changes to the controlzone odf, in my example once again I am changing the alliance and empire Hologeometry but this time I am also changing the CP geometry as well.
Also change the name of the Holo.odf file to what you changed the com_holo_controlzone to.
Hidden/Spoiler:
[GameObjectClass]
ClassLabel = "commandpost"
GeometryName = "cpf_icon_polenf.msh"
GeometryScale = 1.0


[Properties]
SwitchClassRadius = "5.0"
BUILDINGSECTION = "BODY"

Label = "Control Zone"

NeutralizeTime = 12.0
CaptureTime = 10.0

MapTexture = "hud_flag_icon"
MapScale = 2.5
GeometryName = "cpf_icon_polenf"

HoloOdf = "cpf_holo_flag_controlzone"
HoloImageGeometry = "cpf_icon_pole_blu alliance"
HoloImageGeometry = "cpf_icon_pole_red empire"

HoloImageGeometry = "com_icon_republic_flag republic"
HoloImageGeometry = "com_icon_CIS_flag CIS"
HoloTurnOnTime = 2.2
Next you will have to open the renamed holo odf file and make some changes there too.
Hidden/Spoiler:
[GameObjectClass]
ClassLabel = "hologram"

[Properties]
Color = "200 200 200"
NeutralColor = "255 255 255"
FriendlyColor = "30 220 30"
EnemyColor = "240 30 30"
LocalsColor = "240 220 30"
HoloType = "custom"
//HoloImageGeometry = "cpf_icon_pole"
HoloVisibleDistance = 200.0
HoloHeight = 0.0
HoloSize = 1.0
HoloBeamIntensity = 0.001
HoloLightIntensity = 0.001

HoloImageIntensity = 1.0
HoloFlareIntensity = 0.0
HoloLightRadius = 0.0

HoloRotateRate = 0.0
HoloPopRate = 0.00

HoloFlickerRate = 0.00
HoloFlickerAlphaMin = 0.4
HoloFlickerAlphaMax = 0.8
HoloFadeInTime = 2.0
Things that were changed were:
Color changed it lower so the flags weren't quite so bright
HoloType to custom, by doing this it will use the value set in the Color setting changed above. (Thanks to Yodakid for the unintended hint on that one)
Oh and the other color things mentioned there don't do anything useful that I have been able to find yet
HoloHeight because my flag geometry was compensated for when I made it.
HoloSize set to 1 because my model was built at a 1 to 1 scale
HoloBeamIntensity, HoloFlareIntensity, HoloLightRadius set these at or near zero because I didn't want any holo glow.
HoloRotateRate set to zero because I didn't want it to rotate.
HoloFlickerRate set to zero becuase I didn't want it to flicker.
HoloPopRate to zero, didn't want it doing the wierd pop thing.

And the result was a set of flags that are in color and appear to raise and lower as the CP is taken over.
Hidden/Spoiler:
Image
Image
Image
Image
In this case for the modeling the pole is the CP msh and the two flags are the hologeometry, they were made at raised height.

A couple of final notes.
So far no one has been able to figure out how to change the red and blue holo colors for friend and enemy. You can change the color of the holo using the Color and custom setting in the holo odf but the CP won't change when taken over.
Also during all this I found out that the only thing you can attach cloth to (other than a unit) is a prop (the error log told me so) so you can have a flag but it is static.

These are just a few things I discovered while playing around, I encourage you to do so also especially with the holo odf settings they can do some fun effects.

Re: Custom Command Posts

Posted: Thu Feb 19, 2009 2:19 am
by AQT
Wow, that's pretty neat. Very useful non-Star Wars mods. :)

Re: Custom Command Posts

Posted: Thu Feb 19, 2009 12:41 pm
by Null_1138
Peter Griffin wrote: Freakin' Sweet!
That's incredible! I wonder if Pandemic knew this could happen... :funny2:

Re: Custom Command Posts

Posted: Thu Feb 19, 2009 9:12 pm
by Master_Ben
Awesome. I do sometimes wonder what Pandemic must be thinking watching uss... :o

Re: Custom Command Posts

Posted: Fri Feb 20, 2009 9:31 am
by Teancum
Wait, are you saying we have control over the holo color? That's what I was trying to fix for Classic Conquest on the Conversion Pack. If we do I need to get with Mav and fix that.

Re: Custom Command Posts

Posted: Fri Feb 20, 2009 9:51 am
by FragMe!
A couple of final notes.
So far no one has been able to figure out how to change the red and blue holo colors for friend and enemy. You can change the color of the holo using the Color and custom setting in the holo odf but the CP won't change when taken over.
Unfortunately no not yet, you can change their color but it is static.
Was playing with trying to put some SetProperty and SetClassProperty line in the lua to see if the colors could be changed that way. Had some small success with SetClassPropertry ("com_bldg_controlzone", "ColorizeByTeam", 1) it turned the little command post msh blue then red when the other team took it over. Tried adding the EnemyColor FriendColor lines that appear in the holo odf to the lua but I didn't see any change, playing with lua's is also not my strong point so if anyone who is better versed in them wants to try please do.

Re: Custom Command Posts

Posted: Sat Feb 21, 2009 12:31 am
by MasterFang1
Hey FragMe! I followed most of the stuff in this, and i wanted a holo that displayed the imperial sniper. But in-game the sniper was all squished into a weird mess, do you know how come? By the way, this is BF1 im talking about.

Re: Custom Command Posts

Posted: Sat Feb 21, 2009 12:40 am
by Grev
A quick question that arose from me reading the above post. Can you use any geometry and it will show up like the holo, such as the ships you used, or are those ship holograms you have custom made?

Master Fang: I think the reason is because units use a skeleton, and thus can't be used as a prop/ etc. without it.

Re: Custom Command Posts

Posted: Sat Feb 21, 2009 12:47 am
by ryukaji
grev, you can use any model, except units I guess if they squish, but they will be normal sized, he used the asset fighters that he scaled down in xsi

Re: Custom Command Posts

Posted: Sat Feb 21, 2009 10:03 am
by obiboba3po
:eek: :eek: lol fragme! i think ill haev to use this in my map ;)

Re: Custom Command Posts

Posted: Sat Feb 21, 2009 10:47 am
by Fluffy_the_ic
Sweet! *runs off to scale down capital ships to a good size*

Re: Custom Command Posts

Posted: Sat Feb 21, 2009 11:28 am
by Ping
If you haven't already done so, you could add this to the Everything You Need thread, since this is very useful info, FragMe! :D

Re: Custom Command Posts

Posted: Sat Feb 21, 2009 12:03 pm
by FragMe!
Grev wrote:A quick question that arose from me reading the above post. Can you use any geometry and it will show up like the holo, such as the ships you used, or are those ship holograms you have custom made?

Master Fang: I think the reason is because units use a skeleton, and thus can't be used as a prop/ etc. without it.
Yes any geometry (except things with bones as they tend to get all mucked up as you see)
All I did for the ships was scale them down and lock s foils into attack position. :lol: just because it looked better. And as mentioned a greyscale texture works best.

There is also a scale setting in the Holo odf which will scale the holo geometry if you don't want to remake the msh. It is HoloSize = 2.5 for a normal icon so play and see if you get something that works.

Oh and one thing not specifically mentioned but it is a given, you have to replace any existing controlzones with your modified ones in ZE.

Re: Custom Command Posts

Posted: Sat Feb 21, 2009 12:05 pm
by obiboba3po
wait fragme! you said you cant really change colors. would that include this? (taken form medieval project)
Image

Re: Custom Command Posts

Posted: Sat Feb 21, 2009 12:08 pm
by FragMe!
That could just be a "colorized", non changing by team ownership, controlzone, you'd have to ask the author of the map if that what it is.

Re: Custom Command Posts

Posted: Sat Feb 21, 2009 12:58 pm
by Fluffy_the_ic
That pic almost looks like it's from BF1 to me...

Re: Custom Command Posts

Posted: Sat Feb 21, 2009 10:18 pm
by MasterFang1
There is no blue cps in BF1 fluffy.

Re: Custom Command Posts

Posted: Sat Feb 21, 2009 11:09 pm
by trainmaster611
Great find Frag! Not exactly sure how we could use this but great nonetheless.

Re: Custom Command Posts

Posted: Sat Feb 21, 2009 11:35 pm
by Fluffy_the_ic
MasterFang1 wrote:There is no blue cps in BF1 fluffy.
But that's a green cp in that pic.

Re: Custom Command Posts

Posted: Sat Feb 21, 2009 11:39 pm
by Taivyx
Fluffy_the_ic wrote:
MasterFang1 wrote:There is no blue cps in BF1 fluffy.
But that's a green cp in that pic.
......along with a blue one :roll: