News:

Welcome to World of Banished!

Main Menu

Request for help understanding .rsc files

Started by salamander, October 04, 2014, 06:28:25 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

salamander

Quote from: slink on October 04, 2014, 01:00:19 PM
@salamander, at think you may be correct.  Luke has struggled enough with roads that it's probably mostly hard-coded by now.  Some day I would like more types of appearance, but the behavior probably can't be changed.

Well, I tried the following one more time with the thought that maybe I had done something incorrectly the first time.  I was hoping that even though there was no PathBits variable in the original 'createroad', the game might use one if it was present in the altered version.  Unfortunately, there was no difference in a new game in pathing of roads.

The original entry for 'createroad' in DirtRoad.rsc:

CreateRoadDescription createroad
{
        uchar _index = 1;
// ComponentDescription _rawMaterial = 0;
}


With addition of a PathBits variable to 'createroad' in DirtRoad.rsc:

CreateRoadDescription createroad
{
//added following line
PathBits _placeBits = Normal | Obstacle | Walkable;

uchar _index = 1;
// ComponentDescription _rawMaterial = 0;
}



The lack of much of anything in the original version is making me think you're right, @slink -- most of the road behavior may be hard-coded.  Incidentally, to make sure I had the procedure for making small changes correctly and having them reflected in-game, I tried making a change to cropfields.rsc (changed max size from 15 to 16 in both directions) and it did show up in the game, so I think I'm doing that part right.

Pangaea

Perhaps I'm being an idiot again, but the game keeps crashing on me when trying to change things in the newest modkit version. Have the relevant files in a mod-folder and tried running this line of code, but the game crashes on launch with some *.cpp line error code. Sigh :(

Quote..\..\bin\x64\Application-x64-profile.exe /pathres ../mymods/tmpmod /pathdat ../mymods/tmpmod/bin

slink

Quote from: Pangaea on October 05, 2014, 11:36:58 AM
Perhaps I'm being an idiot again, but the game keeps crashing on me when trying to change things in the newest modkit version. Have the relevant files in a mod-folder and tried running this line of code, but the game crashes on launch with some *.cpp line error code. Sigh :(

Quote..\..\bin\x64\Application-x64-profile.exe /pathres ../mymods/tmpmod /pathdat ../mymods/tmpmod/bin

Delete everything in your bin directories except for the WinData directory.  The recopy the stuff from your downloaded zip files.  I was getting a cpp error for a short while this morning and it appeared as though one of the dll files wasn't updated properly.  Or maybe it got overwritten by something else, but at any rate copying everything back on fixed that.

Pangaea

Before writing that post I tried to delete everything, twice, but to no effect :(

slink

Did you remember to copy over the data0.pkg, patch01.pkm, and patch02.pkm from the regular game directory, and re-run BuildResources?

Pangaea

Quote from: slink on October 05, 2014, 04:26:35 PM
Did you remember to copy over the data0.pkg, patch01.pkm, and patch02.pkm from the regular game directory, and re-run BuildResources?

Heh, that I had actually forgotten, so had indeed been an idiot. I had run the buildresources, but had not copied over the pkms. Did it now, and thought all was well as the game at least launched with the same code as above. But upon creating a new game, the game once again crashed with a similar-looking cpp error message. I'm losing the will to live here :(

An assertion failure has occurred. A crash dump has been saved.

Location: Object\External.cpp(425)
Message: Can't build resource from 'Dialog\SharedElements.rsc:borderButton'!
Expression: false

Callstack:
Runtime-x64-profile.dll(0x00000000ed9bb733)
Runtime-x64-profile.dll(0x00000000ed9ba0e8)
Runtime-x64-profile.dll(0x00000000ed9a3468)
Runtime-x64-profile.dll(0x00000000ed9a7006)
Application-x64-profile.exe(0x000000003f4fda17)
Runtime-x64-profile.dll(0x00000000edaa3deb)
Application-x64-profile.exe(0x000000003f4fd5e7)
Application-x64-profile.exe(0x000000003f56b245)
Application-x64-profile.exe(0x000000003f56b310)
Runtime-x64-profile.dll(0x00000000edaa3deb)
Application-x64-profile.exe(0x000000003f56abff)
Runtime-x64-profile.dll(0x00000000ed9a3981)
Runtime-x64-profile.dll(0x00000000ed9a7006)
Application-x64-profile.exe(0x000000003f548fb7)
Runtime-x64-profile.dll(0x00000000edaa3deb)
Application-x64-profile.exe(0x000000003f54951a)
Runtime-x64-profile.dll(0x00000000edaa3deb)
Application-x64-profile.exe(0x000000003f54922f)
Runtime-x64-profile.dll(0x00000000ed9a3981)
Runtime-x64-profile.dll(0x00000000ed9a7006)
Application-x64-profile.exe(0x000000003f405662)
Application-x64-profile.exe(0x000000003f4e9931)
Runtime-x64-profile.dll(0x00000000ed9a18e4)
Runtime-x64-profile.dll(0x00000000ed9a71b0)
Runtime-x64-profile.dll(0x00000000ed9ac72c)
Runtime-x64-profile.dll(0x00000000ed9ac24b)
Runtime-x64-profile.dll(0x00000000ed9abd1f)
Runtime-x64-profile.dll(0x00000000ed9a18e4)
Runtime-x64-profile.dll(0x00000000ed9a71b0)
Runtime-x64-profile.dll(0x00000000ed9ac72c)
Runtime-x64-profile.dll(0x00000000ed9ac24b)
Runtime-x64-profile.dll(0x00000000ed9abd1f)
Runtime-x64-profile.dll(0x00000000ed9a18e4)
Runtime-x64-profile.dll(0x00000000ed9a71b0)
Runtime-x64-profile.dll(0x00000000ed9f8e9a)
Runtime-x64-profile.dll(0x00000000ed9f3403)
Runtime-x64-profile.dll(0x00000000ed9c019c)
MSVCR110.dll(0x00000000f9293fef)
MSVCR110.dll(0x00000000f9294196)
kernel32.dll(0x00000000779b59ed)
ntdll.dll(0x0000000077aec541)


I haven't touched a thing in any of the files, not even before re-installing the mod kit, as I prefer to retain the original files and work with copies. I just changed a little thing in the cropfield.rsc file, to see if it took (drag size from 15 to 20), but I'm getting this error even without that change.

slink

Delete resources and copy in the new ones, then run BuildResources.  He might have changed some of the source code with his new mouse stuff.

Pangaea

That's what I've done several times now. Deleted everything, and copied over files and built resources (and examples). Still giving me errors. Maybe I'm not meant to do any more modding.

Pangaea

Awesome, now the normal game doesn't work any more either. The application appears in task manager for a few seconds, then ends. I see nothing about it opening. And I haven't touched a single file over there, besides copying them to the modkit folder (yes, they were copied, not moved, they are still there).

slink

Use regedit to remove every reference to Mod_Whatever.

Pangaea

Tried that too now, but still no change. Also removed all mod files to a backup folder, but that doesn't change anything either. How frustrating. Could be the end of the 2000-pop city I've been working on for weeks  :'( :-[

slink

Here is what the Banished directory should look like.

slink

Oh, and check Task Manager.  You might have multiple copies of Application-x whatever open under processes but not showing as applications.  You need to get rid of those either by killing them or by rebooting.

Pangaea

I have many more files than you have, probably due to it being a GOG version as some of them are GOG-specific by the looks of it.

Already killed duplicates btw, but when launching the program again, the application appears in task manager/processes for a few seconds, then disappears again.

The odd thing is that I haven't done anything to the main game files. Guess I have to try to reinstall the whole thing and hope that fixes it. Just hope that doesn't kill the town I have been working on. If it does, I'm probably done with this game.

slink

Your saved towns are under Documents\Banished, or at least mine are.