The making of a new/updated .def for 1.4 and .ent for 1.5


(EB) #1

[ It has been a long time in the waiting. ]
There are plenty of missing keys and values from the .def file used with 1.4 & even with the 1.5 release, bringing the use of the .ent file to replace the .def file, there are even more things missing from the .ent file. SPOG did state that some things were fixed/added in the entities.ent but there is still more to do. You will notice that in 1.5 that the angle panel is no longer available in the entity properties window, amongst other things, this information will have to be added to the .def/.ent files.

So here’s the plan…to update the new format “.ent” as much as possible. Then I’ll take that information and update the 1.4 “.def” accordingly.

I invite anyone to post what they believe is a ‘valid material addition’ for the “.ent” file.
(Please refer to the “et_entities.ENT” file (defaultly placed in - [C:\Program Files\GtkRadiant 1.5.0\et.game\etmain] ) for the base of this project.)

----If I was unclear or shorthanded about anything, feel free to ask in reference to any point.

[note: Shaderman has volunteered to help me co-head this project.]

EDITED: ReyalP made a helpful post HERE. Now you guys have almost all of the tools, just incase any of you guys are interested in joining in on this project.


(Chruker) #2

How about making a small database, which contained the entities in one table and the keys in another table. Then put all the definitions in there. That would make it easy to generate files for both 1.4 and 1.5 and 1.6 and 1.7 and 1.8 and 1.9 and 2.0 and etc. :slight_smile:


(SCDS_reyalP) #3

The .ent file seems to be XML (as are almost all the newer radiant related files.) It should be easy enough to automatically generate .def files from that.


(Chruker) #4

Yeah, I’m using a xml parser to see if I can take a shortcut, instead of copy-pasting it into the databasen.


(MrLego) #5

You will notice that in 1.5 that the angle panel is no longer available

  • sorely missed.

Are the toolbar commands that come with SD radiant within the scope of the .ent & .def files?

There are some very useful functions in that toolbar that are ET specific ie: “foliage planter” and some that apply to other games as well ie: “flip triangles”


(Shaderman) #6

Yes, it’s XML but some elements seem to be specially handled by Radiant.

I’ve added the missing func_secret entity which looks like this:

<group name="func_secret" color="0 .5 .8">
-------- KEYS --------
<integer key="key" name="Key">-1 for locked, 0 for open.  Default '0' unless door is targeted.</integer>
<angle key="angle" name="Angle">Determines the opening direction.</angle>
<targetname key="targetname" name="Target Name">Target this entity to open it.</targetname>
<real key="speed" name="Speed">movement speed (default 100).</real>
<real key="wait" name="Wait">Time (in seconds) before returning (2 default, -1 = never return).</real>
<real key="lip" name="Lip">Lip remaining at end of move - how much door will be left sticking from adjacent solid geometry (8 default).</real>
<integer key="dmg" name="Damage">Damage to inflict when blocked (2 default).</integer>
<real key="health" name="Health">If set, the door will also open when hurt.</real>
<string key="team" name="Team">Team name. Other doors with same team name will open/close in syncronicity.</string>
<model key="model2" name="Model2">Optional .md3 model to also draw.</model>
<color key="color" name="Model Light Color">constantLight color.</color>
<integer key="light" name="Light">ConstantLight radius</integer>
-------- SPAWNFLAGS --------
<flag key="REVERSE" name="Reverse" bit="0">Changes sliding direction left/right.</flag>
<flag key="TOUCH" name="Touch" bit="1">Opens when touched or hurt - can't be targeted.</flag>
-------- NOTES --------
Secret door which opens inwards, then to the side. No usefield.
Seems to crush always.
</group>

Now look at this picture:

The field of the angle element is filled with a 0, the model element generates a button for a file (md3) selector and there are integer elements which may be validated in future Radiant releases.

Would be nice to have a tool to convert the .ent file to a *.def file to keep both versions in sync. Would be perfect IMO if the entity keys could be ordered alphabetically at the same time :slight_smile:

No. We’re trying to update the entities you may use in Radiant. The toolbar with its functions should be a coding thing we won’t touch.


(Chruker) #7

Would be perfect IMO if the entity keys could be ordered alphabetically at the same time

That should be easy if you generate them from a database. However in the existing .ent files and .def file some of the entities have their keys grouped in KEYS and Q3MAP2 KEYS. But since you are getting the effect you’re looking for, it doesn’t really matter whether the compiler or game that does it.


(kamikazee) #8

Sorting is allso possible in XML, for a given group of sub-elements.


(EB) #9

The PARSING*(<changed that) of the XML is a good idea, I already planned on utilizing that idea.
(I wanted to update the 1.5 .ent and then make a 1.4 .def file from that…so you guys are on the same path I am on.)

I do think that the switch to XML is great. Incredibly great actually.

Anyone know the chance of getting the 1.4 plug-ins for this edition ? I will be researching this as well, but if you can save me time…please share.
:tapir:


(Chruker) #10

The following page is generated by a small database: http://games.chruker.dk/enemy_territory/entities.php

I just need to add some administration tools to add stuff.

Funny story. On my local machine the script takes 25 secs to generate the large list, but if I turn my antivirus off it takes less than 1 sec. :eek2:


(EB) #11

nice,

BTW, shaderman made a suggestion to me for making the menu listings in the entity property windows, easier to use.
To utilize more drop down menus (with the addition of having a type line as well), to use for certain/most entity property settings. (sounds like jibberish but I will give an example)

Worldspawn:
KEY: Atmosphere
VALUE:(drop down selectables: )
Radar’s rain settings
Railgun’s snow settings
(blank - for type line use) enter settings here type thing.

So I will be re-writing some of the XML as well. Then we can see if people like that option or not and go from there.

-cheers
Things of that nature which alleviate thought so that even a monkey could map easily. :nag:


(Roeltje) #12

I find it so weird… why does the new gtk 1.5.0 have all the new entities but not func_button? :stuck_out_tongue:


(EB) #13

*added to list of missing
Thanks

b
Here is the worldspawn XML for a quick example:[I will clean it up when I have more time] [/b] EVERYTHING I CHANGED/ADDED IS IN BLUE

[ul]<!–

WORLDSPAWN

=============================================================================
–>
<list name=“atmo”>
<item name=“Type in your settings on the line below or select them” value=""/>
<item name=“railgun’s snow” value=“T=SNOW,B=5 10,C=0.5,G=0.3 2,BV=20 30,GV=25 40,W=3 5,D=2400”/>
<item name=“Radar’s rain” value=“T=RAIN,B=5 10,C=0.5,G=0.5 2,BV=50 50,GV=200 200,W=1 2,D=2000”/>
</list>
<group name=“worldspawn” color=“0 0 0”>
-------- KEYS --------
<atmo key=“atmosphere” name=“atmosphere settings”>adds snow,rain…</atmo>
<string key=“atmosphere” name=“atmosphere type in text line”>you can either choose from radar rain, railgun snow or type in your own settings</string>
<sound key=“music” name=“Music”>Music wav file</sound>
<real key="_ambient;ambient" name=“Ambient Intensity”>Adds a constant value to overall lighting. Use is not recommended. Ambient light will have a tendency to flatten out variations in light and shade.</real>
<color key=“color” name=“Ambient Color”>RGB value for ambient light color (default is 0 0 0).</color>
<real key=“gravity” name=“Gravity”>Gravity of level (default is normal gravity: 800).</real>
<integer3 key=“gridsize” name=“Dynamic Light Granularity”>Granularity of the lightgrid created by q3map. Value is three integers separated by spaces, representing number of units between grid points in X Y Z. Default gridsize value is 128 128 256. Use larger powers of 2 to reduce BSP size and compile time on very large maps.</integer3>
<integer key="_blocksize" name=“BSP Block Size”>q3map always splits the BSP tree along the planes X=_blocksizen and Y=_blocksizen. Default _blocksize value is 1024. Increase the blocksize using larger powers of 2 to reduce compile times on very large maps with a low structural brush density.</integer>
<string key=“message” name=“Message”>Text to print during connection process. Name of the map</string>
<string key=“sun” name=“Sun shader”>Shader to use for ‘sun’ image. May be overriden by shader.</string>
<real key=“fogclip” name=“Fogclip”>Uses vis to exclude stuff beyond the specified distance.</real>
<integer2 key=“mapcoordsmins” name=“mapcoordsmins”>Top left corner coordinate. Example “-256 256”.</integer2>
<integer2 key=“mapcoordsmaxs” name=“mapcoordsmaxs”>Lower right corner coordinate. Example “256 -256”. Both mapcoordsmins and mapcoordsmaxs must be set for command map and auto map to work properly.</integer2>
-------- SPAWNFLAGS --------
<flag key=“NO_GT_WOLF” name=“No campaign” bit=“0”>Campaign cannot be played on this map</flag>
<flag key=“NO_STOPWATCH” name=“No stopwatch” bit=“1”>Stopwatch cannot be played on this map</flag>
<flag key=“NO_LMS” name=“No LMS” bit=“3”>Last Man Standing cannot be played on this map</flag>
-------- NOTES --------
Every map should have exactly one worldspawn.
</group>[/ul]

So we have images 1,2,3
(1 is the entity window using the above code and 2 shows a type selected while 3 shows the text line in use. )

  • The text-type in line overrides the dropdown selection.


FEEDBACK ???


(Shaderman) #14

*added to list of missing
Thanks[/quote]
I have added func_button and func_secret.


(Chruker) #15

Does any of you have access to put the updated one, into the next radiant release? EB? Shaderman?


(Shaderman) #16

I don’t have access but of course I’ll try (we’ll try) to get our updates into the official release after a while. I’m sure there will be a way to manage this.


(EB) #17

I edited my previous post to reflect some things and then I realized that people have been busy posting. o.O :stuck_out_tongue_winking_eye:

@Chruker, I will find a way. :wink:


(SCDS_reyalP) #18

In the past updates to the .def file, I just attached the updated file to a bug in the gtkradiant bugzilla (e.g. http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=905 ). You could also send it to the radiant mailing list instead.

EB: I’m not sure radiant will correctly handle what you did with the atmosphere stuff. Mind you, I haven’t looked at the 1.5 code at all, so thats pure speculation.

Chruker: Some keys (such as angle) are meaningful to the editor, so it isn’t surprising they are handled specially.


(Roeltje) #19

Omg that looks nice EB :smiley: :smiley: :smiley: :smiley:


(Shaderman) #20

Thanks!

EB: I’m not sure radiant will correctly handle what you did with the atmosphere stuff. Mind you, I haven’t looked at the 1.5 code at all, so thats pure speculation.

It works fine even if it’s a workaround (at least with the current beta).