[Release] Urban Assault Level editor

For those of us who are curious and like to poke around in the game's data files and scripts as well as glitching. Caters to anything from unit/building stats to level data to telling how to glitch and stories of game errors.
Ydro
Firefly
Firefly
Posts: 9
Joined: Thu Mar 19, 2020 4:05 pm

[Release] Urban Assault Level editor

Post by Ydro » Fri Mar 20, 2020 9:22 pm

Hi everyone,
After couple months of development I want to share fruit of my work.
I've been reading these forums before to see if there are some tools for non-technical
users to make their own maps with no knowledge about level file structure.
I've found one tool in the ftp page but its functionality is pretty limited,
mainly because of lack of loading an existing level and some restrictions regarding to
squad/hoststation positioning. This is why I've created my own level editor with
extended possibilities and compatibility with modern systems.

As I get more familiar with programming I wanted to make use of it and make
something more ambitious to get more experience so this what I've done so far.
Urban Assault is one of my childhood games that I've been fascinating for years.
I found out that old games like doom or quake are still alive because they have
decent level editors that are still in use by communities which makes them everlasting.
I hope that my tool will be useful and make the UA mapping/modding more easier.

Because I've made this editor with pure java, it should be compatible with all
modern operating systems(Windows/Linux/MacOS) so all you need is
Java runtime environment which can be easily downloaded from official site.

You will be able to:
- create completely a new level with desired dimensions
- open all the existing levels (including original ones)
- easily position hoststations and squads just by dragging them
- instantly check the appearance(typ map) of selected sectors in level manager
- change hoststation for player
- randomly generate appearance of all sectors
and more :D

MD expansion is now fully supported!
If you have any remarks, ideas or if you find any bugs then don't hesitate to post it :D

Download link:
https://mega.nz/file/DVsjCLLQ#0ziCySLX8 ... 3KwSa22rpQ

Have fun!
Attachments
uale4.jpg
uale3.jpg
uale1.jpg
Last edited by Ydro on Mon Jul 13, 2020 8:22 pm, edited 6 times in total.

User avatar
CharlotteLabyrinth
Turantul 2 Skorpio (Global Moderator)
Turantul 2 Skorpio (Global Moderator)
Posts: 562
Joined: Thu Mar 01, 2012 3:00 pm
Location: Schloss Charlottenburg...?

Re: [Release] Urban Assault Level editor

Post by CharlotteLabyrinth » Sun Mar 22, 2020 8:38 am

Hello Ydro. Firstly, thank you for your valuable contribution! A level editor like this will undoubtedly be a great addition to UA community.


Since many of us modders are accustomed to build levels through a text editor, which was the method even endorsed by the developers as mentioned in their documentations, I wholeheartedly agree that such a complicated method of creating levels caused many people without modding knowledge to become easily discouraged from designing levels in UA.


Admittedly, the unreleased official 3D level editor for Urban Assault (WINDSGN.exe) was quite unstable and cumbersome to create levels efficiently, and that custom-made level compiler (I think this is what you're referring to) was indeed incomplete and lacked many basic functions from its author.

There is another level editor with 3D rendering support developed by Ormu, which I believe was written in Python. However, I'm not sure if this level editor was ever released to the public...


I assume Metropolis Dawn levels are unsupported because of their independent data & scripts structure from the original UA? As I believe MD adds a few more vehicle and building types, but the sector definitions for each set are identical to the original game.

I will test this level editor later, and see if i can make any suggestions or a bug report. From the screenshots, it appears that the coordinates in the editor do not correspond directly to the game engine by your own design choice, am I correct?
;------------------------
;
; Vielleicht der niedlichste Hubi, Knuddel.
;

„ Helfen - Wehren - Heilen “
Image
Special thanks to CERNBox!

Personal Declaration: I always use different usernames across different websites. Hence if you ever see my username is being used outside of Stoudson Corporation, I have absolutely no affiliation whatsoever with that!

Ydro
Firefly
Firefly
Posts: 9
Joined: Thu Mar 19, 2020 4:05 pm

Re: [Release] Urban Assault Level editor

Post by Ydro » Sun Mar 22, 2020 3:56 pm

Thank you, I'm glad that I was able to contribute and bring something valuable!

Editing a level with text editor was somehow dull method for me and testing every change, values, coords doesn't always bring desired effects. I've created this for beginners to have vast possibilities for their creativity as well as for experienced modders to conveniently edit any specific part of their level.

The coordinates that I applied here are specific to the rendering method of this editor. It uses math formula that calculates coords in the editor to values that are compatible by the game engine during the saving process.
Likewise if you open a level, the coords inside the file are parsed and calculated accordingly to editor's values. This is not 100% accurate because of a slight distortion caused by lower numbers used in this coord method.
However the differences between values in editor and original files are barely noticeable visually so I think it is bearable. If you save an original level with this editor second time, everything will be exactly the same.
Height values of hoststations are intact except I had to include a minus sign.

MD expansion uses a little different data and will take more time to investigate all the IDs and modify the code to switch between two modes.
Perhaps I will implement it in the future :D

User avatar
CharlotteLabyrinth
Turantul 2 Skorpio (Global Moderator)
Turantul 2 Skorpio (Global Moderator)
Posts: 562
Joined: Thu Mar 01, 2012 3:00 pm
Location: Schloss Charlottenburg...?

Re: [Release] Urban Assault Level editor

Post by CharlotteLabyrinth » Mon Mar 30, 2020 12:40 pm

I was quite busy recently and totally forgot to check this! :D

Sorry about the delay, I'll try to test it and perhaps make a report in the next few days if possible.
;------------------------
;
; Vielleicht der niedlichste Hubi, Knuddel.
;

„ Helfen - Wehren - Heilen “
Image
Special thanks to CERNBox!

Personal Declaration: I always use different usernames across different websites. Hence if you ever see my username is being used outside of Stoudson Corporation, I have absolutely no affiliation whatsoever with that!

Ormu
Turantul 1 (Veteran)
Turantul 1 (Veteran)
Posts: 906
Joined: Fri Dec 26, 2008 4:59 pm
Location: Finland

Re: [Release] Urban Assault Level editor

Post by Ormu » Mon Mar 30, 2020 4:14 pm

I'll try this at some point. The screenshots look really good and I agree that this will be a very valuable tool to all content creators. Hopefully someone with an active campaign or level design project notices this too.

I think it's actually quite impressive how people have made so many great levels over the years using only a text editor. But a proper level editor is definitely a great improvement. While we now have windsgn.exe at our disposal, I agree with CharlotteLabyrinth that it's somewhat cumbersome to use.


Do you plan to add support for multiplayer levels? While the multiplayer scene is really inactive nowadays, there may be a small revival once Zidane adds multiplayer support into UA_source.

Metropolis Dawn uses the same sets of sectors as the original campaign, but some vehicle and building (not sector) numbers may be different. This applies to multiplayer as well. A more comprehensive solution is to load the needed information dynamically from the game folder.
Im in ur base, stalkin ur hoststation

Ydro
Firefly
Firefly
Posts: 9
Joined: Thu Mar 19, 2020 4:05 pm

Re: [Release] Urban Assault Level editor

Post by Ydro » Mon Mar 30, 2020 9:07 pm

I've quickly checked the MD expansion levels' structures to see how many things are there to consider. Indeed, there are just different IDs of vehicles and buildings to analyse since I couldn't find any docs.

Multiplayer is not my priority right now as I see that players do not really play it but we will see what happens after UA source with multiplayer support comes out.

Ormu
Turantul 1 (Veteran)
Turantul 1 (Veteran)
Posts: 906
Joined: Fri Dec 26, 2008 4:59 pm
Location: Finland

Re: [Release] Urban Assault Level editor

Post by Ormu » Thu Apr 16, 2020 3:42 pm

I tried this for a while. It looks pretty good already and I hope that someone with actual level design experience could provide feedback as well.

Some ideas:

-- Showing the cliff marker when the height difference is too high to be driven by tanks would be very useful. I think the highest difference that tanks can pass is 3 height units but I'm not completely sure.

-- Ability to select and edit multiple sectors at once would be very useful, especially for height map editing

-- Ability to "paint" by clicking and dragging would be useful for owner map editing and perhaps typ_map editing as well


Less essential features that might be useful:

-- Automatic calculation for the maximum energy absorption rate. The reload_const parameter is not very intuitive. The calculations can be found somewhere on this forum. Note that it's different for the AI and the player.

-- 0 might be a more intuitive shortcut for neutral owner. Not a big issue of course.

-- I suggest using a different color for faction 7 (drones) to distinguish it from faction 0 (neutral). Purple, for example.

-- Owner 0 is not valid for blg_map buildings so a warning would be useful. Or, just refuse to set the owner to 0.

-- The conversion factor for Stoudson bomb countdown is 1024, not 1000. So 1 minute means 61440 Stoudson units.

-- Single-player tech upgrades can upgrade multiple vehicles at once (not an essential feature)
Im in ur base, stalkin ur hoststation

User avatar
CharlotteLabyrinth
Turantul 2 Skorpio (Global Moderator)
Turantul 2 Skorpio (Global Moderator)
Posts: 562
Joined: Thu Mar 01, 2012 3:00 pm
Location: Schloss Charlottenburg...?

Re: [Release] Urban Assault Level editor

Post by CharlotteLabyrinth » Thu Apr 16, 2020 6:24 pm

I was originally going to make a post about this earlier, but seems like it was delayed!

This was not an extensive test so I may miss out some details, but I played a bit around with it. The general functionality of the editor looks great so far!


Here are some ideas and suggestions. I omitted the features that have been already suggested by Ormu:

  • Add view modes for sector types, owners, and building numbers. Currently the only available view mode seems to be height values.

  • Allow the level manager to get highlighted when double-clicking on any map element (such as units or sectors), even when the manager is turned off. This will be helpful for quickly bringing up the level manager onto the screen, or when if there are some other windows overlapping it on the screen.

  • Sector height values should be displayed over the graphics elements. Currently, the 'Hgt' numbers overlap with the sector elements, and with some building graphics they are hard to see.

  • To expand on Ormu's idea for calculating the maximum energy absorption rate in the game, the reload_const to energy rating calculation for AI and user use the following conversion factors:
    CharlotteLabyrinth wrote:
    Sun Feb 18, 2018 4:09 pm
    The precise formula for calculating the Drak Constant (reload_const) value of 1 energy rating to +1 energy absorption rate conversion in the game engine is 60000/255(=235.2941176470588...)

    For AI, it uses separate algorithm modules so the formula changes to 70000/255(=274.5098039215686...)

    I.e. (240000 user reload_const) = (280000 AI reload_const)

    Therefore, the actual maximum energy absorption rate in the game can be calculated by using the conversion factors for user (60000/255) and AI (70000/255) as a denominator for reload_const values.

    E.g. reload_const = 240000 for the player will result in +1020 maximum energy absorption rate in the game.

  • Remove or adjust the predefined difficulty and behaviour settings for AI host stations:

    I doubt if these preset difficulty options are really necessary, since they are quite subjective and I genuinely think it is better to encourage people to set their own AI parameters manually to better accommodate unique level designs.


    To address some issues, the budgets for constructing buildings (especially power stations) should be enabled regardless of AI's difficulty, since they are a fully integral part of the gameplay.

    This will also cause serious problems in levels without power stations where AI players are supposed to create their own power sources from the scratch. Right now, the 'Easy' and 'Normal' AI settings in the editor do not allow AI to build any structures at all.


    Moreover, enabling radar construction AI should be entirely considered from the level designer's perspective regardless of difficulty. The AI's radar construction routine allows AI host stations to venture out into far territory, which makes them highly vulnerable and susceptible to attack from the other factions.

    Developers knew this and so when the AI host stations are allowed to construct radar stations in some levels, they usually assigned very low budgets to make such behaviour less frequent. At the moment, the 'Defense', 'Hard', and 'Expert' AI settings in the editor have this value set at 40, 25, or 45 respectively. Which translates to AI host stations will attempt to construct radar stations for every 360, 450, or 330 seconds.

    These values are quite high and, in the case of 'Defense' AI, is counterproductive to its supposed behaviour. The AI will also stay in the same position for a prolonged time if their movement budgets are set too low. Generally, if AI host stations are allowed to build radar stations, they should be assigned with higher movement budget values to compensate its routine.


    Regarding the delay values, I don't believe they are necessary. Since the actual game mechanics of how 'budget' and 'delay' values really work in the game engine are quite counterintuitive to their names.

    For the record, the 'budget' parameters alone purely determine the delay intervals between how frequently AI will perform certain actions. These are calculated in percentual values relative to ten minutes.

    (E.g. 90 is one minute interval between each action, while 10 is nine minutes interval.)

    In comparison, the 'delay' parameters only serve as an one-time function that is used to prevent AI from using certain budgets at the start of the level. So unless you want to make a very specific custom pattern for AI at the start, the delay parts are not very important especially as the game lasts longer.


    If these predefined behaviours are going to be used, then I suggest increasing the values of all budgets (especially defence) than they are currently set now, while all the delay values are removed (all delay values are set to 0) for all difficulty types.

    My personal recommendations are as follows: the budget values should be recalibrated on such a scale that the 'Easy' difficulty is assigned with every budgets set to at least 50 (could be set lower, but it really depends on a perceived difficulty) except the radar construction budget.

    Whereas for the 'Expert' difficulty, all budgets are set at 99, again except for the radar construction budget. This will make a very diligent and vigilant AI for the 'Expert' difficulty. But in all honesty, these preset difficulty options are not quite necessary in my view...


    The following list is the default budget values that are assigned to AI host stations in the game engine, when there is no defined parameters for the AI host stations in the level script:

    Code: Select all

    #define YRA_EPConquer_DEF       (30)        // Wichtigkeit Eroberung
    #define YRA_EPDefense_DEF       (90)        // Wichtigkeit Verteidigung
    #define YRA_EPRadar_DEF         (30)        // Wichtigkeit Radar
    #define YRA_EPPower_DEF         (50)        // Wichtigkeit Kraftwerk
    #define YRA_EPSafety_DEF        (50)        // Wichtigkeit Flak
    #define YRA_EPReconnoitre_DEF   (80)        // Wichtigkeit Aufklärung
    #define YRA_EPChangePlace_DEF   (100)       // Wichtigkeit Platzwechsel
    #define YRA_EPRobo_DEF          (100)       // Wichtigkeit Robobekämpfung
EDIT: Retroactively looked up this post again, and the above 'standard' parameters for robos do not seem to be present in the final version of the game.


Typos:

Heatbeat -> Heartbeat
Druid Player -> Druid Prayer

(These track names seem to be taken directly from the unofficial level compiler, but since I don't believe they are the official track names either, I think those track names could be simply removed.)


@Ormu
Ormu wrote:
Thu Apr 16, 2020 3:42 pm
-- Showing the cliff marker when the height difference is too high to be driven by tanks would be very useful. I think the highest difference that tanks can pass is 3 height units but I'm not completely sure.
The maximum elevation difference that ground units can pass is 4; starting from the elevation difference of 5 or more the terrain becomes inaccessible.
;------------------------
;
; Vielleicht der niedlichste Hubi, Knuddel.
;

„ Helfen - Wehren - Heilen “
Image
Special thanks to CERNBox!

Personal Declaration: I always use different usernames across different websites. Hence if you ever see my username is being used outside of Stoudson Corporation, I have absolutely no affiliation whatsoever with that!

Ormu
Turantul 1 (Veteran)
Turantul 1 (Veteran)
Posts: 906
Joined: Fri Dec 26, 2008 4:59 pm
Location: Finland

Re: [Release] Urban Assault Level editor

Post by Ormu » Thu Apr 16, 2020 7:22 pm

CharlotteLabyrinth wrote:
Thu Apr 16, 2020 6:24 pm
Remove or adjust the predefined difficulty and behaviour settings for AI host stations:

I doubt if these preset difficulty options are really necessary, since they are quite subjective and I genuinely think it is better to encourage people to set their own AI parameters manually to better accommodate unique level designs.
I agree that such presets may be subjective, and what values should be used with each preset is a matter of great debate. But I like the general idea of presets because they can be very helpful for beginners.

@Ormu
Ormu wrote:
Thu Apr 16, 2020 3:42 pm
-- Showing the cliff marker when the height difference is too high to be driven by tanks would be very useful. I think the highest difference that tanks can pass is 3 height units but I'm not completely sure.
The maximum elevation difference that ground units can pass is 4; starting from the elevation difference of 5 or more the terrain becomes inaccessible.
Thanks for clarification. I could recall "4" but I wasn't sure if it was the last passable or the first impassable height. :P
Im in ur base, stalkin ur hoststation

Ydro
Firefly
Firefly
Posts: 9
Joined: Thu Mar 19, 2020 4:05 pm

Re: [Release] Urban Assault Level editor

Post by Ydro » Sun Apr 19, 2020 6:12 pm

Ok so I have already updated the editor with some new functionality based on your suggestions.

I've decided to rearrange the files and packed them as zip with cross platform version along with AI behaviour files. The built-in predefined AI stats have been removed and superseded by json files which contain some AI behavior stats created by myself. I want to encourage level designers to create their own AI stats and share them in single files. In the future updates I will add more json files to the zip if people share their own predefined AI behavior.

So here are the changes:

- added cliff marker to recognize if sectors are accessible by tanks/ground vehicles

- the maximum energy absorption rate(Reload const) is now automatically calculated for the player and AI

- height values are now being displayed on top of all elements (except for error exclamation marks :D)

- predefined AI behavior settings have been removed

- added preliminary support for MD expansion: you can open all MD levels but some content is not being displayed or is not accessible

- you can now instantly invoke the level manager by double-clicking on a squad, host station or sector

- the assets have been compressed for better performance and smaller file size (from 121MB to 31MB!)

- changed neutral sector shortcut from 8 to 0

- added "About" section for some minor information

- conversion factor for Stoudson bomb countdown has been set to 1024

- music track names have been removed

- fixed bug with selected host station for player



This is it for now. More updates are coming soon.
-- Single-player tech upgrades can upgrade multiple vehicles at once (not an essential feature
I am not sure if I understood it correctly but you can upgrade multiple vehicles at once in the level manager

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest