How to add buildings

Adding Buildings to edifice.bst; support/discussion/questions

Moderator: thunderchero

How helpful/useful did you find this topic?

Poll ended at Thu Jul 14, 2011 3:35 pm

1 - I don't read English so was hard to understand the British sence of humour.
0
No votes
2 - I have no interest in trying to understand this!
1
10%
3 - I can read but FTLOG seriouly what does it all mean?
1
10%
4 - It made sence to me but I don't do Hexadecimal Modding.
2
20%
5 - I tried this and it failed so I gave up.
0
No votes
6 - Got to say it was hard work but i enjoyed doing this.
1
10%
7 - I got it to work and I am now trying some of my own ideas...I'll let you know how I get on.
3
30%
8 - Don't Know.
0
No votes
9 - Great work easy to understand and implement even though i've never used Hexadecimal Editor or got an education :)
2
20%
 
Total votes: 10

User avatar
Nucky9
Ensign
Ensign
Posts: 20
Joined: Tue Sep 15, 2009 2:00 am

Something strange..

Post by Nucky9 »

Ok, this is a great discovery and I am eager to implement it, but I have a strange problem.

I followed the directions you gave, Peter and the first time everything went fine when I added 5 more wind turbines, using UDM III as a base. They showed up as expected in UE and I could edit them. However, every time I looked at a building, I got an error which I realized was due to entering the wrong value @ 0x0004-7 [math error].

No problem, it should have been an easy fix, but then the weirdness started. No matter what I do to the edifice.bst file, UE always seems to read the unmodified version. For instance, if I extract, modify and then add the file back in and save, then go to buildings, nothing has changed. If I re-extract the edifice file, and open it with a hex editor, all my changes are gone.

Even stranger, if I use Jzip to extract and add back the file, and then open stbof with UE, again no change when I go to buildings. If I extract the file using UE, it is again the unmodified version. Yet, if I again extract the file using Jzip from the same STbof.res, it looks like it should. Somehow it seems that UE is using an older version of edifice no matter what I do, even though the new modded version is in the Stbof file.

Needless to say, this is driving me crazy, especially since I was so close to getting it to work the first time.

Any help would be greatly appreciated!
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2404
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Post by Tethys »

What version of UE do you have? Are your paths set correctly in UE? This can be checked by going to Settings tab and making sure the Path is identical in both locations, and make sure it is the path you wanted (ie UDM3)

Dont forget, you must follow the tutorial perfectly, or it will not work. I had to read it twice to make sure i understood correctly.

EDIT: For instance, the end of MY structure file differed from Peter's (somehow?), so some common sense was practiced as I made my way to the end of the buildings list, inserted my information, and was on my way with the remainder of the tutorial.
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
Peter1981
Rear-Admiral
Rear-Admiral
Posts: 1118
Joined: Tue May 06, 2008 2:00 am
Location: England

Post by Peter1981 »

if you have checked what tethys said about paths.

If you did use tech above 9 :-

What value for technology requirment did you use? Trek.exe and UE will not work with building technology requirements over nine UE will not save buildings with required technolgies over ten and Trek.exe (even if UE had saved them) will crash.

If you didn't use tech above 9 :-

Offset 0x0004 to 0x0007 this is the address of the buildings address map -- even if you put a wrong address here i.e. a couple of bytes off all you'd have been doing is reading the descriptions from the wrong part of edifdesc.bst I can't see how this would remove your building from edifice.bst.

Hope this helps :) if not post the following :-

Can you post your 5 structures details and what you originally set 0x0004 to 0x0007?
What version of UE are you using?
What version of UDM are you modding?
User avatar
DOT
Lieutenant-Commander
Lieutenant-Commander
Posts: 100
Joined: Tue Dec 23, 2008 3:00 am
Location: 49°N, 8°E

Post by DOT »

Uh, I run at least once in the situation, where I didn't follow the letters with adding buildings and then I could do what I want it was not possible to get the files working correct again.
Had to use the backup files and start adding/editing from the beginning.
life long and prosper
User avatar
Peter1981
Rear-Admiral
Rear-Admiral
Posts: 1118
Joined: Tue May 06, 2008 2:00 am
Location: England

Post by Peter1981 »

sorry to hear that dot, did working from scratch solve the problem?
User avatar
Nucky9
Ensign
Ensign
Posts: 20
Joined: Tue Sep 15, 2009 2:00 am

Post by Nucky9 »

Tethys/Peter - I think you misunderstood me. The issue wasn't making the changes to the edifice file, but rather somehow UE kept reverting back to the non-hex edited version of the file.

Not a big deal though, I switched computers and the issue was resolved.

I do have another issue now though. When I make the changes you outlined Peter, I am getting the same error as before. So, as you said, my miscalculation of the index was not the problem. This is using UDM 3.0.1., UE 0.7.1dev5a.

Adding a single turbine I get the following errors:
edifdesc.bst: String at index 318 not found
edifdesc.bst: String at address 00 00 10 59 not found.

So, I can see the wind turbine at the end. But these errors keep popping up. Also when I click on wind turbine, I see the details for whatever building I had last looked at.


What I did:
Extracted the 3 files (what is the purpose of extracting the other two files that aren't modified?).
Inserted your wind turbine entry @ 0xDD84.
Changed 0xDDD4-DDD5 from 13 01 to 3E 01.
Changed 0x0000-3 from 3E 01 00 00 to 3F 01 00 00.
Changed 0x0004-7 from 84 DD 00 00 to 34 DE 00 00.
Added edifice.bst.
Saved + loaded.
Get error as noted (interestingly, if I do building overview, the wind turbine shows up fine for all the races).

Not sure if I missed something somewhere, but I can't figure out what I might have done wrong.

Thanks for the help.
User avatar
DOT
Lieutenant-Commander
Lieutenant-Commander
Posts: 100
Joined: Tue Dec 23, 2008 3:00 am
Location: 49°N, 8°E

Post by DOT »

@Peter1981: Yes, it did.
Guess that I messed up trek.exe in the process of adding more buildings after I had successfully added two buildings. Even bughunting with a hex editor by comparing working old and nonworking new files couldn't solve the problem.
life long and prosper
User avatar
Peter1981
Rear-Admiral
Rear-Admiral
Posts: 1118
Joined: Tue May 06, 2008 2:00 am
Location: England

Post by Peter1981 »

Have just followed the how to myself with UMD3 and i get the same errors as you do Nuky9 !
Extracted the 3 files (what is the purpose of extracting the other two files that aren't modified?).
so they are all backed up together as they work togeter
Inserted your wind turbine entry @ 0xDD84.
Changed 0xDDD4-DDD5 from 13 01 to 3E 01.
Changed 0x0000-3 from 3E 01 00 00 to 3F 01 00 00.
Changed 0x0004-7 from 84 DD 00 00 to 34 DE 00 00.
Added edifice.bst.
Saved + loaded
these are the correct steps but, I have done them myself as you did with UMD3 and it didn't work ?!?

I am investigating this but i'm not sure why the string is missing -- when I made my moddification i didn't have any thing like this and i was very much more brute force with my modification as it had never been done before -- and i didn't get either error message.

(@DCER any ideas?)
User avatar
Peter1981
Rear-Admiral
Rear-Admiral
Posts: 1118
Joined: Tue May 06, 2008 2:00 am
Location: England

Post by Peter1981 »

Sorry I just realised my mistake, the wind turbine entry is diffrent for each mod, and contains a pointer that may change from mod to mod!

Take a look at the 0xAC to 0xAF last four bytes of the new building entry in your edifice.bst change these to the same as the entry above ie the same as the 4 bytes 176bytes previous (romulans reserch building 9), save the file

Open UE and add the edifice.bst file back in

then EDIT -> Structures -> Building Stats

this work out the error messages for me, should work for you, sorry for the bother :)
Last edited by Peter1981 on Fri Jul 23, 2010 4:08 am, edited 1 time in total.
User avatar
Nucky9
Ensign
Ensign
Posts: 20
Joined: Tue Sep 15, 2009 2:00 am

Post by Nucky9 »

Peter1981 wrote:this work out the error messages for me should work got you sorry for the bother :)
I copied and pasted the whole previous entry and BOOM, worked like a charm ;).

No need to apologize, and it was no bother at all. Thank you very much for the help!
User avatar
Peter1981
Rear-Admiral
Rear-Admiral
Posts: 1118
Joined: Tue May 06, 2008 2:00 am
Location: England

Post by Peter1981 »

Buildings can now be added with UE thanks DCER for this!

EDIT: 1/july/2011

I'm hoping that we crack the energy screen project by christmas '11 (this year) with SCT, thunderchero, tethys all working on it at the moment :- if your reading this i'd check that topic out ;D
User avatar
rxz1000
Cadet 2nd Year
Cadet 2nd Year
Posts: 7
Joined: Sun Sep 08, 2013 1:17 pm

Re: How to add buildings

Post by rxz1000 »

Hi all,

Can I ask if its possible to add additional buildings for minors so they have more than one to offer?

I tried to add a second betazoid structure to the end of the building list in UE (UE didn't through any wobblers), so that I could renter a save game but alas it wasn't available, just the first building. It didn't cause any crashes having changed the files to the saved game.

Cheers
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7963
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: How to add buildings

Post by thunderchero »

rxz1000 wrote:Hi all,

Can I ask if its possible to add additional buildings for minors so they have more than one to offer?

I tried to add a second betazoid structure to the end of the building list in UE (UE didn't through any wobblers), so that I could renter a save game but alas it wasn't available, just the first building. It didn't cause any crashes having changed the files to the saved game.

Cheers
1. any changes like this will not work on saved games.
2. be sure to assign who can build it properly (same way as original minor structure)
3. even after all that only one can display in diplomacy screen (final page of structures edit 'Minor race special structures")
4. I also suggest moving structure up on structure list so it is just below the original structure
User avatar
rxz1000
Cadet 2nd Year
Cadet 2nd Year
Posts: 7
Joined: Sun Sep 08, 2013 1:17 pm

Re: How to add buildings

Post by rxz1000 »

Cheers Thunderchero,

I sadly noticed point 1 in another post after I made this one. Doh!!
Point 2 is noted. I did have a play with trying to get a minor structure buildable on any planet as a once per system building, once they became members but sadly it didn't work. It ended up being available to all before even being encountered. However as I write this I realize I tried it on a saved file so I might try again.
Point 3 I have never even noticed before despite how much I've played the game before. I can get round this a little by changing the race introduction.
Point 4. I was trying to keep the main production buildings on the same ID's as vanilla as I know certain ones like scanners etc need to be the same ID.
If I do insert second buildings in under the first it will force the mains down. I'll keep checking the integrity to see if it causes an issue.

As ever many thanks for your invaluable help.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7963
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: How to add buildings

Post by thunderchero »

point 3. only effects image that displays for minors in diplomacy screen/race info. only one structure can be assigned per minor race. if you select new structure old structure will be un-selected automatically.

point 4. UE will adjust trek.exe when structures are moved for proper main building positions, scanners and minor race structure image list and a few other things. but this is done automatically, just be sure to allow UE to edit trek.exe when asked, when saving.

but as you noticed, point 1. is the most important thing.
Post Reply

Return to “Adding Buildings to edifice.bst”