Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 4

Author Topic: [LCS]Modding questions(CIA Raids without heat), compiling latest nightly  (Read 9923 times)

Taberone

  • Bay Watcher
    • View Profile

Is it possible to modify(or view, I'm fine with that too.) the game's messages itself, such as combat messages(Liberal hits the head three times BLOWING IT APART! Conservative gasps a last breath and soils the floor), pick-up lines/responses, or anything else?
« Last Edit: October 06, 2015, 09:03:25 pm by Taberone »
Logged

SlatersQuest

  • Bay Watcher
    • View Profile
Re: [LCS]Modifying game messages?
« Reply #1 on: July 23, 2015, 11:03:30 pm »

Yes - the code is open-source! All you need is a compiler  :P

The messages are hard-coded, but being character strings, they are just about the easiest thing in the code to modify. Anything you change within a character string is very unlikely to cause bugs.
Logged

Purple Gorilla

  • Bay Watcher
    • View Profile
Re: [LCS]Modifying game messages?
« Reply #2 on: July 25, 2015, 08:35:31 am »

There is one exception. The Attack and Hit strings ("shoots at";"striking") are inside the WEAPONS.XML, and must be changed seperately.

Taberone

  • Bay Watcher
    • View Profile
Re: [LCS]Modifying game messages?
« Reply #3 on: July 25, 2015, 01:01:52 pm »

There is one exception. The Attack and Hit strings ("shoots at";"striking") are inside the WEAPONS.XML, and must be changed seperately.

Where are seduction lines found at? I want to see all the failed seduction lines the CEO's have (Ex. "I'm a happily married man, sweetie")
Logged

SeriousConcentrate

  • Bay Watcher
  • The Hollow Street Hero
    • View Profile
Re: [LCS]Modifying game messages?
« Reply #4 on: July 25, 2015, 06:46:28 pm »

I would also like to know. Maybe someone could post them? I don't have the time, much less the know how to get them out of the code. :-\
Logged
SerCon Shorts: This Is How You Do It - Twenty-three one minute or less videos of random stupidity in AC:U, Bloodborne, DS2:SotFS, Salt & Sanctuary, and The Witcher 3.

SlatersQuest

  • Bay Watcher
    • View Profile
Re: [LCS]Modifying game messages?
« Reply #5 on: July 25, 2015, 07:20:11 pm »

They're in talk.cpp, in the function doYouComeHereOften()
Logged

Taberone

  • Bay Watcher
    • View Profile
Re: [LCS]Modifying game messages?
« Reply #6 on: July 25, 2015, 09:13:27 pm »

Downloaded the latest build from the LCS Wiki and it gave me a folder called "LCS Nightly" thats uncompiled and shows all the possible dating/combat messages along with music for something "Stalinized". Sounds interesting, but how do I compile since I've never done that before? Its the same reason I've never played Cataclysm: Dark Days Ahead.
« Last Edit: July 25, 2015, 09:15:29 pm by Taberone »
Logged

Purple Gorilla

  • Bay Watcher
    • View Profile
Re: [LCS]Modifying game messages?
« Reply #7 on: July 27, 2015, 12:40:31 pm »

*At first, you need a C-Compiler. There are many freeware compilers, so you have a lot of choice. If you don't know what to choose, use Bloodshed Dev-C - it sucks at some points (the Debugger Crashes often, and inline Assembly uses GNU-Syntax), but it gets the job done.
*Now you have to set up a compiler chain. There are two possible ways to do this, a MAKEFILE or a project.
**The MAKEFILE in the source code assumes that everything is in the same directory, so it won't work. Apearently someone created the Makefile from an IDE with some directory assumtions. Possible workarounds are copying all source code into one directory or editing the makefile.
**The source code contains a project for MSC, that some compilers can import, but unfortunately it seems not to work too. So, how to set up a new project :
*** Start your compilers IDE
*** Create a new project (under File?)
*** Add files to project : Add all *.C Files in the SRC Directory and all its subdirectories except SRC\SANDBOX to the project.
*** Go to Project Settings or the like, and find a place there you can add Directories for the Header/Include files. Add : SRC and All subdirectories of SRC.
*** Go to Linker Settings or the like and add the library SRC\PDCURSES\CURSES.LIB to the Linker command
*** Now you should be able to compile it ... you get a file named GAME.EXE with a standart icon, that complains about the lack of CURSES.DLL
*** Go to Project settings, and look for the option to add an icon, select the Icon WORKSPACE\LCS_NEWS_ICON.ICO
*** Go to Project settings, and set the name of the file to CRIMESQUAD.EXE
*** Copy the CURSES.DLL into the directory, there the CRIMESQUAD.EXE is
*** Now you should be able to run it, but it will complain about the missing XML Files and terminate
*** Copy the ART directory into the directory, there the CRIMESQUAD.EXE is
*** Now it should work.

Taberone

  • Bay Watcher
    • View Profile
Re: [LCS]Modifying game messages?
« Reply #8 on: July 27, 2015, 07:57:30 pm »

*At first, you need a C-Compiler. There are many freeware compilers, so you have a lot of choice. If you don't know what to choose, use Bloodshed Dev-C - it sucks at some points (the Debugger Crashes often, and inline Assembly uses GNU-Syntax), but it gets the job done.
*Now you have to set up a compiler chain. There are two possible ways to do this, a MAKEFILE or a project.
**The MAKEFILE in the source code assumes that everything is in the same directory, so it won't work. Apearently someone created the Makefile from an IDE with some directory assumtions. Possible workarounds are copying all source code into one directory or editing the makefile.
**The source code contains a project for MSC, that some compilers can import, but unfortunately it seems not to work too. So, how to set up a new project :
*** Start your compilers IDE
*** Create a new project (under File?)
*** Add files to project : Add all *.C Files in the SRC Directory and all its subdirectories except SRC\SANDBOX to the project.
*** Go to Project Settings or the like, and find a place there you can add Directories for the Header/Include files. Add : SRC and All subdirectories of SRC.

This is as far as I got today:




Is that good so far?
Logged

Purple Gorilla

  • Bay Watcher
    • View Profile
Re: [LCS]Modifying game messages + LCS Nightly install?
« Reply #9 on: July 28, 2015, 01:22:51 pm »

The Files in the Projekts look good so far.
In the projekt settings, you are currently in the "library directories", but you need "include directories" (click on the rider).
Then, you need all subdirectories of SRC, so it should look the like:

 SRC
 SRC\BASEMODE
 SRC\CMARKUP
 SRC\COMBAT
 SRC\COMMON
 ...

If that is done, you should be able to compile the source code to objects, but the linker will still need the interface for CURSES.DLL. For that, go to Parameter (in the Project seetings), click on add library, and select SRC\PDCURSES\CURSES.LIB).
Note, the compilation of the CREATURETYPES.CPP takes extreme long to compile, so you might need to reduce the compiler optimization (under compiler in the project settings). The Problem is the enormous macro GIVE_WEAPON_CIVILLIAN, that is included multiple times.
If you have Problems, with CREATURETYPES.CPP, you can replace the macros with functions to fix that. The German tanslation uses a function instead of a macro, so you can download the sourcecode (here : http://dffd.bay12games.com/file.php?id=10985) and use the GIVE_WEAPON_CIVILIAN macro and the __GIVE_WEAPON_CIVILIAN function from there.

Taberone

  • Bay Watcher
    • View Profile
Re: [LCS]Modifying game messages + LCS Nightly install?
« Reply #10 on: July 28, 2015, 07:09:49 pm »

The Files in the Projekts look good so far.
In the projekt settings, you are currently in the "library directories", but you need "include directories" (click on the rider).
Then, you need all subdirectories of SRC, so it should look the like:

 SRC
 SRC\BASEMODE
 SRC\CMARKUP
 SRC\COMBAT
 SRC\COMMON
 ...

If that is done, you should be able to compile the source code to objects, but the linker will still need the interface for CURSES.DLL. For that, go to Parameter (in the Project seetings), click on add library, and select SRC\PDCURSES\CURSES.LIB).
Note, the compilation of the CREATURETYPES.CPP takes extreme long to compile, so you might need to reduce the compiler optimization (under compiler in the project settings). The Problem is the enormous macro GIVE_WEAPON_CIVILLIAN, that is included multiple times.
If you have Problems, with CREATURETYPES.CPP, you can replace the macros with functions to fix that. The German tanslation uses a function instead of a macro, so you can download the sourcecode (here : http://dffd.bay12games.com/file.php?id=10985) and use the GIVE_WEAPON_CIVILIAN macro and the __GIVE_WEAPON_CIVILIAN function from there.

What rider? I'm assuming its the "add library or object" button.

Logged

Purple Gorilla

  • Bay Watcher
    • View Profile
Re: [LCS]Modifying game messages + LCS Nightly install?
« Reply #11 on: July 29, 2015, 12:30:56 pm »

Headers and Libraries are different things. The add library or object button is for the curses.lib, but you must still enter the directories for the headers. Commands like #include <creature.h> (note the <> brackets) include a file from a predefined directory. For the C Standart library (io.h,dos.h,...)  the compiler already knows the directory, but for the LCS headers he needs the directories manually added. The proper way to do this would be using the path and "" brackets like #include "src\creature\creature.h", but unfortunately LCS is written that way, so you must add the manually.

It should look that now:

I am not sure if "rider" is the right word in english, but the widget in the red circle is called rider in German, because it is riding on the window. The point is, that there are nested "riders", the top one, there you must pick "include" and the inner one, there you must pick "include directories". In your first screenshot, you were with the inner rider in library directories, but you must go on the include directories (there the red circle is).


The include object or library under parameter is then used for the curses.lib.

Taberone

  • Bay Watcher
    • View Profile
Re: [LCS]Modifying game messages + LCS Nightly install?
« Reply #12 on: July 30, 2015, 07:21:59 pm »

It gave me an error:

(The reason why the folder is called "ERIC RUTH GAMES" is because it was originally a folder for where I put Team Fortress Arcade. It has since then been expanded for other roguelikes and random videogames from Gamejolt.)
« Last Edit: July 30, 2015, 08:44:16 pm by Taberone »
Logged

Purple Gorilla

  • Bay Watcher
    • View Profile
Re: [LCS]Modifying game messages + Compiling LCS Nightly?
« Reply #13 on: July 31, 2015, 02:43:27 pm »

I am not sure what version/Mod you are using, as the unmodded LCS seems not to have this function. However, the problem is, what nullptr is not known, and most likely "nullptr" is the same as "NULL". So use the following Algorithm :
* Open the Projekt
* Go to Search-> Search in Files
* search for "nullptr".
* Is "nullptr" declared in any header ? If yes, include the header into activities.cpp and try again
* If "nullptr" is nowere declared, it is probably a compiler-specific variant of "NULL", so replace the word "nullptr" in the offending line with "NULL" (and repeat this for every other places, there "nullptr" isn't found).

Unmodded LCS doesn't contain any "nullptr", so it should only appear in modded lines anyway. If this works (no crashes or the like), you should probably contact the author of this mod, and say, that he should use "NULL" instead of "nullptr", as it is more portable.

Taberone

  • Bay Watcher
    • View Profile
Re: [LCS]Modifying game messages + Compiling LCS Nightly?
« Reply #14 on: July 31, 2015, 03:16:16 pm »

I am not sure what version/Mod you are using, as the unmodded LCS seems not to have this function. However, the problem is, what nullptr is not known, and most likely "nullptr" is the same as "NULL". So use the following Algorithm :
* Open the Projekt
* Go to Search-> Search in Files
* search for "nullptr".
* Is "nullptr" declared in any header ? If yes, include the header into activities.cpp and try again
* If "nullptr" is nowere declared, it is probably a compiler-specific variant of "NULL", so replace the word "nullptr" in the offending line with "NULL" (and repeat this for every other places, there "nullptr" isn't found).

Unmodded LCS doesn't contain any "nullptr", so it should only appear in modded lines anyway. If this works (no crashes or the like), you should probably contact the author of this mod, and say, that he should use "NULL" instead of "nullptr", as it is more portable.

Its the "latest nightly" according to the wiki: https://github.com/Kamal-Sadek/Liberal-Crime-Squad/tree/nightly


Is the header the entire line with nullptr?
Logged
Pages: [1] 2 3 4