June 18, 2019, 09:12:42 AMLatest Member: beast2hk

Author Topic: How To: modify CorsixTH gameplay through .Lua files  (Read 6342 times)

0 Members and 1 Guest are viewing this topic.

KasperVld

  • Community Manager
  • ****
  • Posts: 88
  • Work to ride, ride to work
    • View Profile
    • Corsix-TH Community website
How To: modify CorsixTH gameplay through .Lua files
« on: November 23, 2010, 04:17:20 PM »
Tired of staff asking for a raise? Want more patients? Can't get your hospitals to make decent money?

There's a lot of things you can easily change through the Lua backend of CorsixTH, first of all I'd like to apologise that all my windows stuff is in dutch, but I'll give english directions as we go!


Stop staff asking for a raise
I got fed up with the endless whining of my staff, so I decided to do something about that, the first thing we'll need is a program to open the .Lua files, I used notepad (kladblok in dutch): start notepad



Next click on file --> open (bestand --> openen in the picture) and open the subdirectory \Lua\entities\ in the map where CorsixTH is installed, in my case that's C:\Hospital\Lua\entities
In the bottom right select 'all files(*.*)' instead of 'textfiles (*.txt)'



Open staff.lua
Now go to the 'edit' menu and select go to (bewerken --> ga naar, in my dutch picture)



When it asks for a line number, enter 112
Now we start modifying the code



Find the line "-- Make staff members request a raise if they are very unhappy" and add two single lines in front of each line below it right up to the last "end", as shown in the picture above



The final step is to save the file (File --> Save) and (re)start CorsixTH for the changes to take effect!



I'll post more How To topics soon if there is any need for them! :)
« Last Edit: November 23, 2010, 04:18:55 PM by KasperVld »

tobylane

  • Registered member
  • *
  • Posts: 53
    • View Profile
Re: How To: modify CorsixTH gameplay through .Lua files
« Reply #1 on: November 23, 2010, 05:58:32 PM »
In the config.txt you can enable Debug menu, and at the start of every level you can use that to disable salary raises.

I prefer this way, it's permanent. Do you know how to make it svn-friendly, so that file will get updated but not that line?

Lego3

  • Project Owner
  • *****
  • Posts: 398
    • View Profile
Re: How To: modify CorsixTH gameplay through .Lua files
« Reply #2 on: November 23, 2010, 06:09:06 PM »
In the config.txt you can enable Debug menu, and at the start of every level you can use that to disable salary raises.

I prefer this way, it's permanent. Do you know how to make it svn-friendly, so that file will get updated but not that line?

As long as we don't alter those exact lines you'll be fine. When we do you'll simply have to remove the file, update, and then comment the lines once again.
For the end of the world spell, press Control, Alt, Delete.

KasperVld

  • Community Manager
  • ****
  • Posts: 88
  • Work to ride, ride to work
    • View Profile
    • Corsix-TH Community website
Re: How To: modify CorsixTH gameplay through .Lua files
« Reply #3 on: November 23, 2010, 06:24:18 PM »
Here's the SVN patch :)

markhobley

  • Registered member
  • *
  • Posts: 47
    • View Profile
Re: How To: modify CorsixTH gameplay through .Lua files
« Reply #4 on: January 28, 2011, 01:03:05 AM »
There is a "fixes and workarounds" section on the public wiki, so hopefully such changes will be listed there.

http://corsixth.wikia.com/wiki/Fixes_and_Workarounds

Grimdoc

  • Moderator
  • ***
  • Posts: 264
  • Translator & Superman
    • View Profile
Re: How To: modify CorsixTH gameplay through .Lua files
« Reply #5 on: January 28, 2011, 11:54:34 AM »
Is Wikia supported by the project leaders?

By the way, is it possible to make a wiki more messy and difficult to browse than Wikia?
For me it looks like a huge mess without any structure  ???
Do you have a question or want to report a bug? CorsixTH newbie guide

Do you want to make (or improve) a translation? CorsixTH translation guide

Steve

  • Registered member
  • *
  • Posts: 19
    • View Profile
Re: How To: modify CorsixTH gameplay through .Lua files
« Reply #6 on: January 28, 2011, 09:17:08 PM »
Is Wikia supported by the project leaders?

Absolutely not.