Jump to content

Realism Mod, Code finished going wrong


Recommended Posts

So, I've written up all of the code for the mod, but when I try to run the game with it I get these specific things as a result: Save and load functions stop working. And the new game goes to **** with all sorts of things going wrong, such as the game not seeing the 6 new premade po1 histories the game offers u when talking to berath, berath's blessings not working and probably more.  This is the output folder I get and I cannot really understand where the code is going wrong here. I hope anyone can help. Also, for some reason the forum only limits my upload to 0,5 mbs which is... very very small. I will try to upload the code bellow for people to see.

output_log.txt

Link to comment
Share on other sites

Now, there is another part called economy and another called abydon but I think if I can find out what is going wrong with these ones I could potentially solve those too. In the items stringtable there are entries which belonged to the recipes which I took out and proceeded to make a separate stringtable for them, as I thought was right, containing recipe names for new foods, just so you know. What they all do: Rymrgand is supposed to adjust game to real time ratio to 1:1 as well as edit existing food and recipes as well as make new ones. Woedica simply changes second wind to per rest status. Economy adjusts base wages and hire costs as well as buy and sell multipliers for vendors.

Rymrgand_part.gamedatabundle Woedica_part.gamedatabundle itemmods.stringtable items.stringtable

Link to comment
Share on other sites

Here is what I could find:

Rymrgand:

If you compare the start of the code for "WorldTime" to what you have copied from global.gamedatabundle , you'll notice that part of the code is missing.

There are a 3 cases where 2 items share the same ID: 

  • "Recipe_food_cured_ysae" & "Recipe_food_cured_cuttlefish" = "9afb7427-e781-4376-9ca8-7d2907ed0d2a"
  • "Recipe_food_salted_roe" & "Recipe_food_salted_poultry" = "c04d204a-78a7-4dca-a383-e9bef9bd3ee6"
  • "Recipe_food_salted_snapper" & "Recipe_food_salted_silverfin" = "eeb412e9-443b-4ca1-ba85-3cfc1bb92e6b"

Woedica:

You are missing some of the mandatory code at the beginning and end of the file:

{
    "GameDataObjects":[

    ]
}

Item.stringtable:

I am not sure if this is in your original file or something that happened when you uploaded it to the forum? But there are lot of unnecessary spaces in the code.

Spoiler

It looks like this:


 <  ? xml version = "1.0" encoding = "utf-8" ?  >
     < StringTableFile xmlns : xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns : xsd = "http://www.w3.org/2001/XMLSchema" >
     < Name > game \ items <  / Name >
     < Entries >
     < Entry >
     < ID > 2984 <  / ID >
     < DefaultText > Eggs <  / DefaultText >
     < FemaleText /  >
     <  / Entry >
     < Entry >
     < ID > 1223 <  / ID >
     < DefaultText > A small batch of common eggs, as produced by a common hen.  <  / DefaultText >
     < FemaleText /  >
     <  / Entry >
     <  / Entries >
    <  / StringTableFile >

When it should look something like this:


<?xml version="1.0" encoding="utf-8"?>
<StringTableFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Name>game\items</Name>
  <Entries>
    <Entry>
      <ID>2984</ID>
      <DefaultText>Eggs</DefaultText>
      <FemaleText />
    </Entry>
    <Entry>
      <ID>1223</ID>
      <DefaultText>A small batch of common eggs, as produced by a common hen.</DefaultText>
      <FemaleText />
    </Entry>
  </Entries>
</StringTableFile>

 

Itemmods.stringtable:

There was a "<" missing from the start, an "<Entry>" before "<Entries>", and some unnecessary spaces in bits of code.

Spoiler

Right:


<?xml version="1.0" encoding="utf-8"?>
<StringTableFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Name>game\itemmods</Name>
  <Entries>
    <Entry>
      <ID>1702</ID>
      <DefaultText>Slight Wear and Tear</DefaultText>
      <FemaleText />
    </Entry>
    <Entry>
      <ID>1703</ID>
      <DefaultText>Severely Damaged</DefaultText>
      <FemaleText />
    </Entry>
  </Entries>
</StringTableFile>

Wrong:


?xml version="1.0" encoding="utf-8"?>
<StringTableFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Name>game\itemmods</Name><Entry>
    < Entries >
      <ID>1702</ID>
      <DefaultText>Slight Wear and Tear</DefaultText>
      <FemaleText />
    </Entry>
    <Entry>
      <ID>1703</ID>
      <DefaultText>Severely Damaged</DefaultText>
      <FemaleText />
    </Entry>
  <  / Entries >
<  / StringTableFile >

 

Stringtables are quite fiddly to edit as anything wrong just breaks stuff throughout the game, hence the spinning gear on load and continue. While the output_log.txt will mention the line it thinks is wrong ("Line 1, position 3" in this case), it only seems to do this with the first line it can find fault with. So you might find yourself opening and closing the game a lot hunting for the real problem. My only advice is just be very cautious while writing them.

Hope this helps.

  • Gasp! 1
Link to comment
Share on other sites

Wow, that is... amazing. I am... moved... that was so so very helpful Kvellen, thank you so so much ^^ I corrected them all and now everything works as intended (well, mostly, but I fixed other errors that came up too!) I didnt know stringtable files worked like this with spaces, I was turning them into json format in notebook ++ and it was creating space everywhere yet I thought that it working like the gamedatabundle files, I can see I was very very wrong, I edited them all and now they work! Now I have to playtest the game to see how I should change the values for the abydon challenge and the mod is ready for release! I'll be sure to add you to the people I'd like to thank on the mod page once it's out... I am very very grateful... all the hours spent coding would have been for nothing had you not helped.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...