Questions

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.
GoldStar611
BlackSect Creator
BlackSect Creator
Posts: 865
Joined: Sun Dec 02, 2007 1:16 am
Location: USA
Contact:

Re: Questions

Post by GoldStar611 » Fri Sep 08, 2017 1:35 am

AquaSide wrote:Is there a way to add a new button to the start menu?
I don't believe so. If I recall correctly, it's hard coded in the UA.exe app itself.
Image
Image

AquaSide
Firefly
Firefly
Posts: 21
Joined: Mon Jul 10, 2017 5:29 pm

Re: Questions

Post by AquaSide » Mon Jan 01, 2018 4:47 pm

Hello guys happy new year! :D I have got some questions again.
1-Is there a way to add a reloading sound :?:
2-Also is there a way to edit skeleton files :?:

AquaSide
Firefly
Firefly
Posts: 21
Joined: Mon Jul 10, 2017 5:29 pm

Re: Questions

Post by AquaSide » Mon Jan 01, 2018 4:49 pm

Also is there a way to spawn a vehicle with the aggressive level that i want?

GoldStar611
BlackSect Creator
BlackSect Creator
Posts: 865
Joined: Sun Dec 02, 2007 1:16 am
Location: USA
Contact:

Re: Questions

Post by GoldStar611 » Mon Jan 01, 2018 6:42 pm

Happy New year.

For #1, I will let someone more familiar with LDF files and/or Zidane answer.

For #2, the answer is: "it's complicated"
Skeleton files can be extracted from .BAS files and imported into Blender fairly easily. That's where things get complicated.
You can resize a vehicle, export it and put it back into the BAS file with no problems if you have the right tools.
If you change the number of verticies then you need to update the related texture data (also in BAS file but in different section) and that is the hard part.
Also if the model you are editing has animations those need to be updated as well.

It was an idea of mine to strip all animations from the BAS files to help others get started but I was not successful as error reporting in UA is not very detailed and removing sections caused errors
Image
Image

User avatar
CharlotteLabyrinth
Turantul 1 (Veteran)
Turantul 1 (Veteran)
Posts: 364
Joined: Thu Mar 01, 2012 3:00 pm
Location: Schloss Charlottenburg..?

Re: Questions

Post by CharlotteLabyrinth » Mon Jan 01, 2018 9:42 pm

Welcome back and Happy New Year!

AquaSide wrote:
Mon Jan 01, 2018 4:47 pm
1-Is there a way to add a reloading sound :?:
Reloading sound in and of itself is not supported by default. But I suppose it is possible to mimic them by manually adding new weapon firing sounds that contain reloading sounds via audio editing softwares.

The files should also contain certain length of blank audio to correspond with each unit's firing delay, and since all sounds are applied to both user and AI vehicles simultaneously you may also have to equalize AI and user weapon for the maximum result.

(In fact, I believe developers didn't added reloading sounds for this reason. As a small alteration in weapon firing delays would result in a total modification of weapon sound files due to mismatch.)

AquaSide wrote:
Mon Jan 01, 2018 4:47 pm
2-Also is there a way to edit skeleton files :?:
If you are familiar with a hex editor it is possible to accomplish simple things like resizing models without specialised tools. But when it comes to more complex tasks like adding new vertices for the models or changing animations and textures on the objects, it becomes exponentially harder to accomplish through hex editing due to numerous complications involved.

I don't remember all the details right now, but there are various tools regarding the modification of .BAS and .SKLT files released by GoldStar611 and Ormu around here. Therefore it is highly recommended to have a look at them.

Just for a tip: when editing model structures with a hex editor, it is important to note that the raw bytes for coordinates of vertices are stored in IEEE-754 format. So you may need a converter for the task.

AquaSide wrote:
Mon Jan 01, 2018 4:49 pm
Also is there a way to spawn a vehicle with the aggressive level that i want?
Unfortunately the aggression levels of units cannot be defined at level files. It has been quite a long time since I looked into the game's core files. But I still remember in the game's algorithm the aggression levels are defined by integer values which range from 0 to 100. (Which translates to 1 = 0; 2 = 25; 3 = 50; 4 = 75; 5 = 100.)

Technically, the game will acknowledge any intermediate values such as 60 as well as long as it is between 0 - 100, but the behaviours of units or squadrons as a whole may be different from the standard. If I have some spare time I'll play around with these values and report the further results.

I know these parameters are collected and saved inside the savegame files (*.sgm). So at this point, I presume your best bet is to start a level, save the game immediately and modify the save file, and then load the game again for a play. For editing aggressions of vehicles you should preferably change integral parts of the entire unit components in a squad.

In the case of AI, it is unclear under what conditions the AI decide to change the aggression levels of the squadrons under their command. AI also do not make use of aggression level 1 (except the auto-retreat when a unit has less than 20% of its energy), 4, and 5 by default in the original game. This part needs more examination/verification. I will have to take a look into executables later.


EDIT: Some corrections...
;----------------------------------------------------------
;
; Vielleicht der niedlichste Hubi, Knuddel.
;
;----------------------------------------------------------

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 absolutely have no affiliation whatsoever with that!

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

Re: Questions

Post by Ormu » Tue Jan 02, 2018 11:13 am

The default aggressiveness level of a unit immediately after creation is always 3 for combat vehicles and 2 for scouts. Changing this by editing the UA executable is possible but impractical. But since CharlotteLabyrinth pointed out the save files, here's something to experiment...

Has anyone tried if the commands used in saves work in the unit scripts or level files? If they do, it might be possible to set the default aggressiveness level of a unit in the scripts or in the modify_vehicle sections in a level.
Image
Matthew Lever wrote:Take out Ormus as soon as you see them.
UA community Discord channel: https://discord.gg/7H4dFQH
Not all Ormus are mine. When in doubt, please ask...

User avatar
CharlotteLabyrinth
Turantul 1 (Veteran)
Turantul 1 (Veteran)
Posts: 364
Joined: Thu Mar 01, 2012 3:00 pm
Location: Schloss Charlottenburg..?

Re: Questions

Post by CharlotteLabyrinth » Wed Jan 03, 2018 6:48 pm

Ormu wrote:
Tue Jan 02, 2018 11:13 am
Has anyone tried if the commands used in saves work in the unit scripts or level files? If they do, it might be possible to set the default aggressiveness level of a unit in the scripts or in the modify_vehicle sections in a level.
I actually tried this long time ago. From what I recall, none of the commands used in *.sgm work for *.scr/*.ldf scripts. Putting one of the lines used in save files into normal scripts or level modifications causes a hard crash with the parse error 'unknown keyword' in ypa_log. Funny how some game tweaks can only be accessed through save files...

For instance, it is possible to make AI control the player's host station by only editing a save file. (I found this trick on my own many years ago, but it may not be a completely new discovery.) Unlike the 'faction swap turret save bug', it does not involve any level file modifications like adding a dummy user host station on enemy factions. So it is much more bug free, and in this case you are actually sitting inside the host station, not the turrets.

Now it reminded me, I may write a post about it in the next week; along with some other stuffs like AI energy system mechanisms.
;----------------------------------------------------------
;
; Vielleicht der niedlichste Hubi, Knuddel.
;
;----------------------------------------------------------

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 absolutely have no affiliation whatsoever with that!

User avatar
Black Sect Lord 2.0
Turantul 1 (Veteran)
Turantul 1 (Veteran)
Posts: 10
Joined: Tue Oct 11, 2016 12:32 am
Location: Argentina
Contact:

Re: Questions

Post by Black Sect Lord 2.0 » Thu Jan 04, 2018 6:01 pm

Well, since this topic is about questions I have 2.

Is there a way to add more sounds to the game? like the ones used for vehicles, weapons, etc.

And can someone help me how to edit the Map and Squadron Manager colors? becauce when I edit them, then start any level, the game crashes. I use Paint.net for this, and I alrready edited the enegry indicators, they look like this:

Image
Future savior, Democratic sussesor of the Black Sect.

"I... I cannot... let the faction end like this..."

"I... I will... I will fight for their sake..."

"Even if... They dont belive in me anymore..."

"I... I will strike you down!"

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

Re: Questions

Post by Ormu » Sat Jan 06, 2018 8:45 pm

Black Sect Lord 2.0 wrote:
Thu Jan 04, 2018 6:01 pm
Well, since this topic is about questions I have 2.

Is there a way to add more sounds to the game? like the ones used for vehicles, weapons, etc.
Yes. The sound files are located in \data\sounds and they follow the WAV format with 11025 Hz sample rate, 8-bit resolution and single channel (mono).

The sound effects of vehicles are typically defined in the ssnd.scr file. It's not necessary to define them there; you can put them into the main vehicle script as well. Check that file for examples.

Adding new vehicle voiceover sets is possible but they have a special format. See these, for example:
viewtopic.php?f=23&t=1299
viewtopic.php?f=23&t=21

And can someone help me how to edit the Map and Squadron Manager colors? becauce when I edit them, then start any level, the game crashes. I use Paint.net for this, and I alrready edited the enegry indicators, they look like this:
I'm not seeing the image for some reason, but the problem is probably related to the color palette. Remember to use correct palette when editing and saving. Also, the file format must be ILBM.
Image
Matthew Lever wrote:Take out Ormus as soon as you see them.
UA community Discord channel: https://discord.gg/7H4dFQH
Not all Ormus are mine. When in doubt, please ask...

User avatar
Black Sect Lord 2.0
Turantul 1 (Veteran)
Turantul 1 (Veteran)
Posts: 10
Joined: Tue Oct 11, 2016 12:32 am
Location: Argentina
Contact:

Re: Questions

Post by Black Sect Lord 2.0 » Sun Jan 07, 2018 1:29 am

Thanks Ormu. I appreciate your help :) . Do you know any program to make this?

Sorry about the image, I dont share things like this often, so I dont exactly know about sharing images.

My mod "Black Sect on Oceania" is going good so far, I made some "special" vehicles ;) . Levels take time to make...
Future savior, Democratic sussesor of the Black Sect.

"I... I cannot... let the faction end like this..."

"I... I will... I will fight for their sake..."

"Even if... They dont belive in me anymore..."

"I... I will strike you down!"

Post Reply