News:

Welcome to World of Banished!

Main Menu

No Idling in hospitals, and maybe a small clinic?

Started by Bobbi, September 08, 2014, 03:31:49 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Bobbi

In @RedKetchup's topic Creamery mod thread, on page two he mentioned:

but in DoctorHouse.rsc i found that :

Code: [Select]

HappinessDescription happiness
{
   HappinessType _happinessType = Health;
   bool _requireWorker = true;
   int _idleRange = 5;
}

Does this mean that potentially a mod could be made to eliminate or at least greatly reduce the desire to hand out in hospitals?

And as another thought, similar to my hope for a smaller church, how about a small clinic for small towns in addition to big hospital? Maybe can only care for 5 people instead of 20? Although personally I feel that 20 isn't very many for a building that size. Maybe 20 per physician and have the ability to add up to, say, 5 doctors?
I wish I could mod....

RedKetchup

yup exactly, you delete those, + the declare statement at top of the .rsc

// layout of the entity
ComponentDescription resource



      "happiness",


and noone we go idle there anymore
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

rkelly17

Quote from: RedKetchup on September 08, 2014, 03:59:49 PM
yup exactly, you delete those, + the declare statement at top of the .rsc

// layout of the entity
ComponentDescription resource



      "happiness",


and noone we go idle there anymore

Seriously? That's all it takes? Man, I wish all stupidity were that easy to deal with.

The other issue with the hospital is that the contagion distance for the disease still holds even when the people are in the hospital. If that could be dealt with we could begin building hospitals in more realistic locations. Now, even if no one were idling at (or inside) the hospital they still get sick just from walking by on their way to some job.

RedKetchup

> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

rkelly17

So, the relevant code in DoctorHouse.rsc is:

HappinessDescription happiness
{
   HappinessType _happinessType = Health;
   bool _requireWorker = true;
   int _idleRange = 5;
}

And:

// layout of the entity
ComponentDescription resource

      "happiness",

All you have to do to keep people from idling in the hospital is delete those lines? If that's true even my meager coding skills may be enough.

The question of reducing contagion around hospitals seems much more complicated, though, eh?

Bobbi

@rkelly17, you make it, I will be happy to test. Reducing contagion would be harder to do, I am guessing.

irrelevant


rkelly17

This is somewhat more frustrating than it appears at first and the instructions in the Readme.html that came with the modkit are not all that helpful.  >:( Could @RedKetchup or @slink or someone who has made a mod come to my rescue? I created a folder called Hostop, put the two changed .rsc files in it (I decided to add the "health" happiness factor to the herbalist's cabin when I took it away from the hospital, so Herbalist.rsc and DoctorHouse.rsc) and then tried to run Tools-x64.exe from the command line as follows:

c:\BanishedKit\bin>Tools-x64 /pathres Hostop /mod NoIdle

This is what came back:

SRS Toolset version 1.0.4 Beta Build 140825

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

Location: Object\ExternalFactory.cpp(207)
Message: Can't use a local file path without loading something previously!
Expression: !_pathStack.IsEmpty()

Callstack:
Runtime-x64-profile.dll(0x00000000e093a733)
unknown(0x00000000fffffffe)
unknown(0x00000000002ccce0)
unknown(0x0000000000000001)
unknown(0x00000000002cbf40)
unknown(0x00000000002ccd90)

The crash dump was identical to the above.

What have I done wrong?  :-[

rkelly17


irrelevant


RedKetchup

your .bat should look more like to that :

bin\Tools-x64.exe /build creameryResources.rsc /pathres ../example/creamery /pathdat ../example/creamery/bin
bin\Tools-x64.exe /mod Package.rsc:creamery /pathres ../example/creamery /pathdat ../example/creamery/bin
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

rkelly17

Quote from: RedKetchup on September 10, 2014, 09:42:19 AM
your .bat should look more like to that :

bin\Tools-x64.exe /build creameryResources.rsc /pathres ../example/creamery /pathdat ../example/creamery/bin
bin\Tools-x64.exe /mod Package.rsc:creamery /pathres ../example/creamery /pathdat ../example/creamery/bin

I'm sorry to be such a pest, @RedKetchup, but could you explain a bit what is going on in each of those lines? As I read them the first line builds a file called creameryResources.rsc in the path indicated, then the second line creates a package called creamery in the paths indicated. Am I getting it? WHat is the difference between /pathres and /pathdat? I'm assuming that the ../ is a reference to the root of  the folder example. Could you also just summarize your folder structure in the mod kit folder?

RedKetchup

#12
the first line compile everything into binary files : it makes your /bin directory and put all your line into binary files aka .crs (your line codes are in txt .rsc)

the second line take all the binary files and do a package with it ( aka your .pkm package)

so if you put your files are in \example\NoIdle

then your .bat should look :


bin\Tools-x64.exe /build NoIdleResources.rsc /pathres ../example/NoIdle /pathdat ../example/NoIdle/bin
bin\Tools-x64.exe /mod Package.rsc:noidle /pathres ../example/NoIdle /pathdat ../example/NoIdle/bin


and your dir \example\NoIdle should look like:

Package.rsc
NoIdleResources.rsc
icon.png

and have a dir called \Template


in \Template dir you should have your modified files like the doctorhouse.rsc and everything you also added
your NoIdleResources.rsc should call your doctorhouse.
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

slink

I use a single batch file named BuildOverride.bat.  It's contents are as follows.

bin\Tools-x64.exe /build Package.rsc:list /pathres ../example/Override /pathdat ../example/Override/bin

bin\Tools-x64.exe /mod Package.rsc:override /pathres ../example/override /pathdat ../example/override/bin


Then, in a directory under Examples I have Package.rsc, for which an example follows.

PackageFile override
{
String _name = "Immortal Orchard Trees Override";
String _author = "SJGL";
String _description = "This mod makes the standard eight orchard trees live forever.";
int _userVersion = 1;

// all files in resource directory
String _includeList
[
"*"
]

// exclude package files, mod files, file used for building packages
String _excludeList
[
"Package_*.crs"
"*.pkg"
"*.pkm"
]
}

ExternalList list
{
External _resources
[
"Template/NaturalResourceAppleTree.rsc"
"Template/NaturalResourceCherryTree.rsc"
"Template/NaturalResourceChestnutTree.rsc"
"Template/NaturalResourcePeachTree.rsc"
"Template/NaturalResourcePearTree.rsc"
"Template/NaturalResourcePecanTree.rsc"
"Template/NaturalResourcePlumTree.rsc"
"Template/NaturalResourceWalnutTree.rsc"
]
}


Then, under the Template directory of Examples\Override I place the rsc files called for by my override.  I keep running BuildOverride.bat until I get everything in Examples\Override that is called for by the error messages, aside from sound, models, and graphics.  The missing files should be placed in the same location relative to the Template directory as they are under Resources.  Eventually there is an override.pgm under bin\WinData.  I move this to the regular game directory and try running it.  If it works, I rename override.pgm to the appropriate name and also rename the Examples\Override directory to the same name.

Why do I do it this way?  I do it this way because I can't edit batch files in the working directory, but I can edit rsc files with PFE running in admin mode.

rkelly17

Thank you so much, both of you. I've always been a RTFM kind of guy but I'm lost without a FM to read.

So I followed instructions as closely as I could and wrote a batch file with both commands it it. When I ran the batch file from the command line it started working quite happily but then came a cropper. It complained: "Can't build resource from 'Dialog\Work.rsc:enable WorkCheck'! @slink had mentioned moving files into the NoIdle folder as error messages cropped up, so I copied Work.rsc from the dialog folder into the NoIdle folder and tried again. Got the exact same error message.

Hmmm. Clearly I need to respond in some way to what the program wants, but I'm not quite sure what it wants.

I used to tell my theology students who were having trouble coping with computers, "Remember, computers are like Fundamentalists. They interpret everything literally." So, what exactly is my computer interpreting literally that I don't see? Do I need every file that Work.rsc calls in the NoIdle folder?