Starwars EAW Anti Bugs Thread

31 Okt 2014 06:00 #69706 von Imperial
I just tryed to import a model using the Alamo importer into 3DS Max, but it wasnt able to find a texture ( that IS inside the mod directory ) and returned
-- Runtime error: Unable to load texture:

Then It imported only 1 part of the model I want and stopped importing, wont import at all. But I allready added the directory of both the original Game and FOC and the Stargate mod to the + linkpaths of the alamo importer.

I think I readed somewhere the path at the top (the first one) is most imporant for the alamo importer, he might ignore some others below.

If you have the texture(s) throw them into FOCs texture directory in .\Star Wars Empire at War Forces of Corruption\Data\Art\Textures
There the Importer should find it if you setted the path.

If you dont have this desired texture just make a copy of any texture in this directory and give it the name the error message returned to you. ( dont mix up .tga or .dds so be aware to use the right texture type )

Alternately you could simply define a new texture directory using +, which makes only sense if you are working on a mod and want to add its directory, but you cant see where the path leads because of space issues -.-

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

19 Dez 2014 01:20 #70652 von Imperial
I found a bug which is well known to me: After importing the alo file and reexporting the shield shadered meshes turned to be invisible, no matter what I do. This error is caused by the model itself in combination with the shield shader (because it is being displayed using other shaders). However, it is easy to fix: Simply export to .obj and reimport using the cw::obj-importer (or as .fbx or any other non 3DS Max format). After reimporting and exporting with the alo exporter that is fixed.

By the way I noticed (this might be just a local setting in my exporter preferences) that both of my .obj exporters fuse every mesh to a single one. This is great if I want to auto-merge all spare parts without spending hours for optimizing, but that fuses lightmesh, collision and the mesh itself.. which is very bad :=D

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

  • Locutus
  • Locutuss Avatar
  • Offline
  • Administrator
  • Administrator
  • [SGMG] Project Co-Lead, Lead Coder, 3D-Artist
19 Dez 2014 11:57 #70657 von Locutus
Regarding the fusion thingy: When exporting the model you can usually set some preferences.
If you use Blender for example, and you chose "export Object as OBJ objects" Max will merge all meshes into one whereas if you chose "export Objects as OBJ groups" the meshes will stay separate.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

19 Dez 2014 20:26 #70668 von Imperial
Thank you for the Info.
I was searching for that setting (only once briefly) but didnt found it.
Will have to search it again, otherwise I will have to export every mesh seperately.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

20 Dez 2014 21:37 #70693 von Imperial
Aand another bug:

The Game ceased its sound input and was entirely silent.

I first loaded in german and saved the game, after closing the game I accidently clicked the english batch file and started the game again, this time in english.

Yeah actually its logically, my version of the game is in german and has no english sounds :=D

So, if you ever start a mod that is supposed to have sound, but you cant hear anything it might happen due to wrong language, you can copy my code into a .txt file and change its extention to .bat

@echo off
color 0B

IF exist sweaw.exe Start sweaw MODPATH=Mods\Modname LANGUAGE=GERMAN
IF exist swfoc.exe Start swfoc MODPATH=Mods\Modname LANGUAGE=GERMAN

Please replace Modname with the name of the name of Mod directory of the Mod you are going to use and German with English or the languge of your Game.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

06 Jan 2015 05:39 - 08 Jan 2015 00:18 #70949 von Imperial
This time: Lua script debugging.

Im just working on a lua script that needs to work properly for each activation, because it is going to be used quite often.
But the damn sequence allways crashes me the script.

After some logics researches I found the line which caused the script to crash almost allways after the first 2-3 activations:


Especially when the game runs with 2x speed.

Activating a sound is a simple and very basic operation, this goddamn engine still manages to utilize this for a script crash :mad:

And this also causes (if 2 or more units use any sound effect via lua script in the same second) the lua script ability to crash for every unit on the map, except for the first one that managed to play the sound effect.
This is the explanation why some abilitys can only be used by only 1 unit, I was desperately serching for this explanation within the last few weeks.
Letzte Änderung: 08 Jan 2015 00:18 von Imperial.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

22 Apr 2015 03:43 #72295 von Imperial
I just had a fighter squadron behaving weird: All fighters moved into eachother to the same position.

This happend because in the .xml code my squadron was acually a "variant_of" another squadron.
The other squadron had 7 units but my variant had only 5 units, this is what caused this bad movement behavoir.

Solution: Simply adding 2 more units to mach the unit count of the original template unit, or making the squadron to be a own squadron instead of a version.

Another issue:

You click on the ability of a Squadron but the button doesent change, it doesent seem to do anything.

Solution: Insert "ABILITY_COUNTDOWN," to the <Behavior> and <SpaceBehavior> tags of both the Fighter unit and its Squadron.
Same for normal space/ground units.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

09 Mai 2015 03:17 #72493 von Imperial
And another LUA Scripting bug.
I just wanted to despawn a whole squadron, and aviously need to do this inside of a for loop but the damn script always crashed.
I had the following code in my loop

if Distance < 160 then

Then I found out the .Despawn() command doesent likes to be used inside a for loop, which caused the crash.

Then I reallized Despawn detects tables and despawns everything in them using this instead outside of the for loop:


But Table_Unit.Despawn() wouldnt work without the [1] .. weird

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

26 Jun 2015 23:37 #73446 von Imperial
And another lua bug.
Following situation:

The spaceship I just made the lua script for, is one of the units in the map.
After I saved and as soon I try to load that savegame the game instantly crashes.

This is one of my favorite bugs, because it takes ages to detect the issue in the code and coz of the critical crashes it causes.

It took hours to find this out because more factors together are the bug, but the code snippets themselfes are correct code!!


The change owner command can crash the script if it is placed under or over a wrong command.
Further I placed it with caution into my script, but it still managed to crash the whole game after loading (in a very misterious way).
This was the main reason for my crashes, but not the only reason.

This if statement also caused trouble:

function Destroy_Nearby_Units ()

if The_Ship ~= false then
The_Ship = false


The actual problem was, a few lines above I registered the death event of The_Ship

Register_Death_Event(The_Ship, Destroy_Nearby_Units)

Register_Death_Event is a function that constantly checks for the destruction of that unit, and appearently contributed to some similar loading crashes in conjunction with my if statement above and the loading process.
Additionally I had a very long if statement in a state that continuously refreshes (which drains memory resources).

So registering functions sometimes may cause loading/saving crashes.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

29 Jul 2015 02:55 #74032 von Imperial
Lua bug:

The command SpawnList crashed my script. Not only because I sometimes forget to put its first parameter into a { } Bracket, but also because I used a local variable as first parameter to spawn a object.

So there are some commands that dont like local variables at all, and spawnlist is one of them.

By the way I also noticed using local parameters in the Definitions function also instantly crashes the script.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Ladezeit der Seite: 0.823 Sekunden