Error during modding, please help

Please post here for questions and discussion about scenario, art and sound modding and the game editor for Distant Worlds.

Moderators: elliotg, Icemania

User avatar
mensrea
Posts: 233
Joined: Fri May 23, 2014 5:37 pm
Location: Pittsburgh

Error during modding, please help

Post by mensrea »

Hello, I am working on a new mod but I seem to be stuck with an error that occurs during map generation. I have spent hours trying to fix it but I just don't know what it could be anymore and I'm hoping a set of different eyes or someone with more skills could help.

Here is the error code:
imgur(dot)com/OCYaR69

..and the mod itself is here:
dl(dot)dropboxusercontent(dot)com/u/56152025/DW_Conquest_v.1a.zip

The error code references asteroids but I removed every reference to asteroids in the code that I could think of and it still persists. I have narrowed the error (seemingly) down to resources as if I swap in the vanilla resources it seems to be fine.

I also removed all references to any resource but 0 in components and races.

Any ideas?
EDIT: Sorry about the broken links, but I am apparently not allowed to post real links until I have been on the forum for a week.

EDIT AGAIN: I uploaded the .txt file which I believe to be at fault in case someone didn't want the whole mod.

Attachments
resources.txt
(7.2 KiB) Downloaded 20 times
User avatar
mensrea
Posts: 233
Joined: Fri May 23, 2014 5:37 pm
Location: Pittsburgh

RE: Error during modding, please help

Post by mensrea »

Hmm, something very strange just happened. I made a change that I had made before but hadnt worked, launched the game and got an error upon world gen. For some reason I decided to launch it again with the same changes in place, and this time it worked? Anyway, I think I fixed this error.


EDIT: No, its still messed up. Sometimes I get the error code from the previous post, sometimes I get the attached error code, and sometimes it runs anyway.

I still find that resources that I set to 100% or vital are not showing up at all, though, which is bad.

Image
Attachments
other error.jpg
other error.jpg (488.43 KiB) Viewed 656 times
User avatar
Darkspire
Posts: 1986
Joined: Thu Jun 12, 2003 8:07 pm
Location: My Own Private Hell

RE: Error during modding, please help

Post by Darkspire »

ORIGINAL: mensrea

Hello, I am working on a new mod but I seem to be stuck with an error that occurs during map generation. I have spent hours trying to fix it but I just don't know what it could be anymore and I'm hoping a set of different eyes or someone with more skills could help.

Here is the error code:
imgur(dot)com/OCYaR69

..and the mod itself is here:
dl(dot)dropboxusercontent(dot)com/u/56152025/DW_Conquest_v.1a.zip

The error code references asteroids but I removed every reference to asteroids in the code that I could think of and it still persists. I have narrowed the error (seemingly) down to resources as if I swap in the vanilla resources it seems to be fine.

I also removed all references to any resource but 0 in components and races.

Any ideas?
EDIT: Sorry about the broken links, but I am apparently not allowed to post real links until I have been on the forum for a week.

EDIT AGAIN: I uploaded the .txt file which I believe to be at fault in case someone didn't want the whole mod.


The following is not meant to offend, just trying to you understand where things may have gone wonky and offering some insight.

I had a look through the resources file and to be honest it is a bit difficult to read, spacing things out make things a lot easier to check when you do get errors. Also looking at the file you have changed / edited quite a bit, so it is very difficult to determine the problem, you really need to edit one thing at a time and test it, edit the next thing and test that etc, once you have got used to it and gained confidence then you will find that you can make larger edits before testing. All I can really hazard a guess at is the resource file, the zip you posted is also missing all the images needed that are defined in the file, you seem to have copied The Ancient Galaxy and are trying to work from that, that theme has a lot of custom work in and that may also be a problem.

Darkspire
User avatar
mensrea
Posts: 233
Joined: Fri May 23, 2014 5:37 pm
Location: Pittsburgh

RE: Error during modding, please help

Post by mensrea »

Well, I think I just narrowed it down to the resources file. I put my resources in the vanilla resources file and filled up resources 25-40 with the vanilla ones. With the only changes to the game being resources 0-25, that narrows it down a good bit. Curious, if I add new fuels do I have to do something else to specify that components can use them? I'm not seeing anything in the components file.
User avatar
Darkspire
Posts: 1986
Joined: Thu Jun 12, 2003 8:07 pm
Location: My Own Private Hell

RE: Error during modding, please help

Post by Darkspire »

I'm not seeing anything in the components file.

Line 127, character 134

' - Reactor: Value1=energy output per second, Value2=energy storage capacity, Value3=fuel units required to charge to full capacity, Value4=fuel resource Id, Value5-7 unused

Darkspire
User avatar
mensrea
Posts: 233
Joined: Fri May 23, 2014 5:37 pm
Location: Pittsburgh

RE: Error during modding, please help

Post by mensrea »

LOL, well, I derped hard! Thanks man!

EDIT: So I swapped the uranium and hydrogen, my fuels, with the slots of caslon and hydrogen, launched the game, and it worked. Then I tried to launch it again and it stopped working thereafter?

I attached the resource file, which I have went over a million times now, and not found anything referencing something that's not there.

Question: do fuels HAVE to be gas?
Attachments
resources.txt
(8.28 KiB) Downloaded 22 times
User avatar
Antarian
Posts: 137
Joined: Fri Jan 03, 2014 1:07 am
Location: Victoria, Canada

RE: Error during modding, please help

Post by Antarian »

DarkSpire is wise, this game it is very easy to 'a mod too far...' and blow the game up. The crashdumps are pretty much useless at figuring things out, you need to carefully track what you mod, and know how to get back. Using a custom folder for all mods so you can switch it out and delete if necessary is also essential. If you take on the main folder, THERE BE DRAGONS...
"If there are gods, they do not care, and justice always goes to the strong. But remember this: All that is done before the naked stars is remembered" Klingon proverb.
User avatar
mensrea
Posts: 233
Joined: Fri May 23, 2014 5:37 pm
Location: Pittsburgh

RE: Error during modding, please help

Post by mensrea »

Ok, so after hours of testing and gradually adding bits and pieces in it all came down to one thing; if I rename resource 14, gold, as anything else, I get an error during map generation.

I can change its spawning pattern, its status from strategic to luxury, its cost, its necessity as a pre-warp resource, and everything else.

If I change the name, though, it all goes to shit.

My mind is blown, as basically this one small tiny thing has locked up my progress for many hours.
User avatar
AnddyiRaynor
Posts: 70
Joined: Fri May 30, 2014 5:24 pm

RE: Error during modding, please help

Post by AnddyiRaynor »

Doubt it there's a actual resource mod (that's what it should be called page #4 atm I think) that changed gold to silicon. (because gold isn't a real resource? that little fact means I'll never use it.)
User avatar
Antarian
Posts: 137
Joined: Fri Jan 03, 2014 1:07 am
Location: Victoria, Canada

RE: Error during modding, please help

Post by Antarian »

Steel is the one that should be changed, it's just iron with a bit of carbon. Carbon fibre is also manufactured, not a resource. Water is a major resource, and isn't in the game. Neither is any kind of fossil fuel, like petroleum or natural gas.

Watched an interesting doc recently about private space mining, which is just getting started. One guy estimated that one large water rich asteroid could provide all the rocket fuel burned in all the shuttle missions flown (!).
"If there are gods, they do not care, and justice always goes to the strong. But remember this: All that is done before the naked stars is remembered" Klingon proverb.
User avatar
Darkspire
Posts: 1986
Joined: Thu Jun 12, 2003 8:07 pm
Location: My Own Private Hell

RE: Error during modding, please help

Post by Darkspire »

ORIGINAL: mensrea

Ok, so after hours of testing and gradually adding bits and pieces in it all came down to one thing; if I rename resource 14, gold, as anything else, I get an error during map generation.

I can change its spawning pattern, its status from strategic to luxury, its cost, its necessity as a pre-warp resource, and everything else.

If I change the name, though, it all goes to shit.

My mind is blown, as basically this one small tiny thing has locked up my progress for many hours.

Attach the text file and I will have a look, the last one attached does not have 14 as Gold.

Darkspire
User avatar
mensrea
Posts: 233
Joined: Fri May 23, 2014 5:37 pm
Location: Pittsburgh

RE: Error during modding, please help

Post by mensrea »

Here is the most recent resource file. I am now working on the images, the components, and the technology. I left gold in and just worked around it, but I really wanted to just have "precious metals" instead, to represent inordinate amounts of metals like gold, silver and platinum, among others. I set golds spawn rate really low.

And yeah, if it worked somewhere else that's great, but I could not change golds name without world gen failing. There are a lot of dependencies that I am missing though, I suspect.
Attachments
resources.txt
(7.83 KiB) Downloaded 48 times
User avatar
Darkspire
Posts: 1986
Joined: Thu Jun 12, 2003 8:07 pm
Location: My Own Private Hell

RE: Error during modding, please help

Post by Darkspire »

ORIGINAL: mensrea

Here is the most recent resource file. I am now working on the images, the components, and the technology. I left gold in and just worked around it, but I really wanted to just have "precious metals" instead, to represent inordinate amounts of metals like gold, silver and platinum, among others. I set golds spawn rate really low.

And yeah, if it worked somewhere else that's great, but I could not change golds name without world gen failing. There are a lot of dependencies that I am missing though, I suspect.

Gold is listed as a luxury (2), not a strategic resource (1)

Darkspire
User avatar
mensrea
Posts: 233
Joined: Fri May 23, 2014 5:37 pm
Location: Pittsburgh

RE: Error during modding, please help

Post by mensrea »

Yeah that's intentional. I am using general stuff like ores/minerals to represent the resources that are needed the most for development. Anything specific is considered to be in very high concentrations and so a something that boosts development (a luxury resource in this game).

Now that you mention it I may remove water as a necessary resource. People could always recycle it, or make it with gases, etc. I just figured that on worlds like desert and volcano with 20 billion+ people it would be very valuable, or even in deep space. It seems to be one too many necessary resources though.
User avatar
Darkspire
Posts: 1986
Joined: Thu Jun 12, 2003 8:07 pm
Location: My Own Private Hell

RE: Error during modding, please help

Post by Darkspire »

ORIGINAL: mensrea

Yeah that's intentional. I am using general stuff like ores/minerals to represent the resources that are needed the most for development. Anything specific is considered to be in very high concentrations and so a something that boosts development (a luxury resource in this game).

Now that you mention it I may remove water as a necessary resource. People could always recycle it, or make it with gases, etc. I just figured that on worlds like desert and volcano with 20 billion+ people it would be very valuable, or even in deep space. It seems to be one too many necessary resources though.

If it is an intentional edit, have you changed all the components that use Gold? I was warned against using luxury resources in components as it can cause problems.

Darkspire
Bingeling
Posts: 5186
Joined: Thu Aug 12, 2010 11:42 am

RE: Error during modding, please help

Post by Bingeling »

ORIGINAL: mensrea

Yeah that's intentional. I am using general stuff like ores/minerals to represent the resources that are needed the most for development. Anything specific is considered to be in very high concentrations and so a something that boosts development (a luxury resource in this game).

Now that you mention it I may remove water as a necessary resource. People could always recycle it, or make it with gases, etc. I just figured that on worlds like desert and volcano with 20 billion+ people it would be very valuable, or even in deep space. It seems to be one too many necessary resources though.
I think water is plentiful in the universe. If there is a water dependent race is living on a desert world, they should know how to get water, right? If not they would not be living there.

As for issues with the resource file. If you think you may have a syntax error (commas messed up), try to load the file in a spreadsheet. Libre Office is free and works. Load it with the comma as field separator, and your info should be nicely lined up, and errors in the structure should become quite apparent.

Example, I copied a resource.txt from the game, and removed a comma from the first line (emeros). Then open it with LibreOffice Calc, and make sure comma is the separator.

The error in the emeros line is pretty obvious:

Image
User avatar
Darkspire
Posts: 1986
Joined: Thu Jun 12, 2003 8:07 pm
Location: My Own Private Hell

RE: Error during modding, please help

Post by Darkspire »

ORIGINAL: Bingeling

The error in the emeros line is pretty obvious:

Image

Image

Would be if I could see it [:D]

Darkspire
User avatar
mensrea
Posts: 233
Joined: Fri May 23, 2014 5:37 pm
Location: Pittsburgh

RE: Error during modding, please help

Post by mensrea »

Yeah, I went through everything in the components file and changed it to only require resource 0 for now (testing purposes). There is a fairly good chance I missed something, but the issue remains: why must resource 14 be named gold. Components/race files all call on the number 14, not the name gold. But, its almost irrelevant now, I just worked around it anyway.

On another note, I can't decide whether theme wise I want to go for warframe or warhammer 40k. If I do warframe I will probably do a custom scenario, if I do warhammer I will just set everything up to take place before the horus heresy. I'm just wondering with the 40k stuff if games workshop would go berserk or something. I have heard of them going pretty far out of their way to protect their IP.
Bingeling
Posts: 5186
Joined: Thu Aug 12, 2010 11:42 am

RE: Error during modding, please help

Post by Bingeling »

ORIGINAL: Darkspire

Would be if I could see it [:D]

Darkspire
I could see it just fine [&:]

I put it at a new location, and edited my post.
User avatar
Antarian
Posts: 137
Joined: Fri Jan 03, 2014 1:07 am
Location: Victoria, Canada

RE: Error during modding, please help

Post by Antarian »

I think Hydrogen is far more plentiful than H20, yet it's required to be mined. Water similarly would require to be mined from asteroids and transferred from water-rich colonies. The conflict between water as necessary to life and water as needed in heavy industry is already apparent on our own world. As spacefaring races expand and their populations grow, I'd think they'd constantly be on the hunt for a good water supply. Our own solar system is teeming with hydrogen compared to water.

The resources list is completely illogical, a mash-bag of true valuable minerals and things that are manufactured currently on Earth. I don't think we'd even be using steel by the time we have interstellar spaceflight, it would be some ultra-light and strong titanium derivative I'd guess.

It would be nice to see someone put some thought into it and hash out a proper resource list.
"If there are gods, they do not care, and justice always goes to the strong. But remember this: All that is done before the naked stars is remembered" Klingon proverb.
Post Reply

Return to “Design and Modding”