Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - IsaacG

Pages: 1 ... 18 19 [20]
286
Curses / LCS 4.12.68
« on: July 20, 2016, 07:21:33 pm »
Discord Server Link
https://discord.gg/HYbss8eswM

Release:
4.12.68
Thanks to jonathansfox

*Fixed special editions not affecting public opinion

With Music and source code:
https://mega.nz/file/KL5Dwa7R#S-WKWcP82kmQJ0bHlWTVqE69AnMKI837rXNsQ-cWRnw

Without:
https://mega.nz/file/CLAghaZD#P-Vh9_QZYVe4nsOsZl-Kpb9VSaH1pEw8P65Ls_uUaVA
(2022-08-15
7 years, since I started)

Savefile Editor!
Spoiler (click to show/hide)
Those who'd like to help debug can look at the Unstable build.
Available on github.
https://github.com/King-Drake/Liberal-Crime-Squad
Updated to 4.12.67
Older Changes:
Spoiler (click to show/hide)

287
Curses / Re: [Unofficial Download] LCS Release r855
« on: September 18, 2015, 05:22:21 pm »
Is it me, or is there a bug with threatening hostages? The "No Reply" option does nothing, and I can only offer to trade the hostage or coldly execute the hostage.
I checked the source code and that part is commented as "TODO: make this do something"
There's a reason it's an unofficial release.
Well, that's more due to the fact that nobody did anything with the code, at least at the time of r855. I literally just grabbed the files manually from Sourceforge or what-have-you that were already compiled, I didn't touch the code at all.

I might actually do another unofficial release if I have some time and can find the latest compiled version newer than r855.
I'm not sure when your compile is from exactly, but I pulled a copy from the SVN back in July, if you're interested.
http://www.mediafire.com/download/dz0ue0ixk8nc38x/LCS+Source+20150727.rar

288
Curses / Re: [LCS] Why Limit Hate Speech is a Conservative Prop.?
« on: September 15, 2015, 04:05:28 pm »
As a personal political note. I am against [unfettered] free speech.

Certain speeches should be protected, (Speaking out against the government). Others should be illegal, (Threats, hate, the entire KKK)

that is not free speech, you are against free speech
This is taking an ideal, free speech, interpreting it a specific way, and then claiming that anyone who disagrees with that interpretation is opposed to the ideal.
We all agree with the ideal of free speech, we just don't agree on the definition of free speech.
The classic is yelling "Fire!" in a crowded theater, knowing the resulting panic could cause trampling and severe injury or death.  Just about no one believes this action should be without consequences, and therefore not all forms of speech are protected under the ideal of "free speech".  The legal definition prevents free speech from including anything that creates "a clear and present danger."
Hate speech and threats of violence have no small amount of debate for whether they constitute free speech, or whether they constitute a clear and present danger.

I recommend saving the statement "you are against free speech" for elsewhere.

289
Curses / Re: LCS Improved Procedural Strings Support - sample
« on: September 12, 2015, 11:52:05 am »
A table and a 2D array are not interchangeable concepts. 2D arrays have only one data type, whereas for a table, each field can be a different data type. So you can't emulate a proper data table with a 2D array, unless you only have one type of data in the table. If you want to relate strings, ints, pointers or chars together in a table-like format, you need to make a struct with a constructor for each row.
True, I'd forgotten about type safety.  I guess if you override type safety you can still use a 2D array as a table, but that's kind of like using bolt cutters to clip your toenails.
I've been looking over the code a bit, and using a struct allows you to include the various enumerators or constants throughout the code, which is a great idea I hadn't considered.  I was working out how to use a map, but a variable struct could take the place of my partially empty arrays.  That way I won't have to add a conditional to test individual strings.

Also, my C++ book is terrible.  I'm glad to have some code that explains how to make structs instead of having to rely on it.

290
Curses / Re: [MOD] Abortion Mod
« on: September 12, 2015, 11:36:16 am »
And the legend in L is that "Abortion is legal, but taxpayer funding of abortion is prohibited," so, some women could try a back-alley doctor cheaper than the State hospital.
That is one of the most depressing statements I've seen on this forum.

291
Curses / Re: Trying to compile on VS 2013 Community
« on: September 12, 2015, 11:31:37 am »
Doing everything through one huge #include is really dumb. I'm sure that adds a heap to compile time. I'm a big fan of every cpp file #including just the functionality that they need. That way, you can see the dependencies quickly for any file by looking at the top of the file rather than having to guess which files might break if you change a specific thing.
I agree entirely.  In Eclipse, it even complains if you try to do that with Java (sort of).
Putting everything in includes.h completely defeats some central aspects of object oriented programming.
Fixing it, however, is likely a bigger challenge than what we're working on already.

292
Curses / Re: [Unofficial Download] LCS Release r855
« on: September 12, 2015, 11:26:47 am »
Is it me, or is there a bug with threatening hostages? The "No Reply" option does nothing, and I can only offer to trade the hostage or coldly execute the hostage.
I checked the source code and that part is commented as "TODO: make this do something"
There's a reason it's an unofficial release.

293
Curses / Re: LCS Improved Procedural Strings Support (almost)
« on: September 08, 2015, 02:45:30 pm »
When I'm talking about reducing the logic to data structures, it can take many forms, for example one change I made to how education works before was to put all the classes in a table, and have the display code work out how many screen pages to use and which ones per page.
Ah.  I'm tempted to argue that a table is just a 2-d array, but that would be pedantic.

The file I worked on before as a proof of concept was basemode/activate.cpp so I'm going to take a look at that again for this project.

EDIT: I just modified activate.cpp so that the lessons are in a table, and everything is handled by loops in the minimal amount of code. The advantage is that you can add or remove subjects from the lessons without touching the code itself, you just change the lesson codes or the labels, add or remove whole subjects from the table quickly, and the code does the work for you and handles input numbers and the right amount of lesson pages based on how many there are. The outcome in terms of lines of code, it reduced the number of lines of code in the project by about 70.
That sounds excellent.  Now that I think about it, there are quite a few portions where the code would do well in table form, even just in the segments I'm familiar with.
Where can I get a copy of your modified activate.cpp?

294
Curses / Re: [LCS] Why Limit Hate Speech is a Conservative Prop.?
« on: September 03, 2015, 10:36:11 am »
As a personal political note. I am against [unfettered] free speech.

Certain speeches should be protected, (Speaking out against the government). Others should be illegal, (Threats, hate, the entire KKK)

In what way is 'speaking out against [insert item here]' different from 'hate against [insert item here]'?  I'm not necessarily disagreeing - but the danger here is in differences in definition, which is why these things aren't clean, black-and-white topics (except in LCS!  ;D)
Aye, that's why this topic is so [darn] controversial.  It's part of why it can be misleading to attempt to place all issues on a single sliding scale from liberal to conservative.

LCS attempts to simplify this and other topics by strawmanning the conservative side into fascism, and presenting liberalism as a utopia.  In order to present the two as absolute opposites, anything one side agrees to is utterly opposed by the other.  One side has guns available at every convenience store, the other lacks guns entirely.  One side has entirely private insurance and outlaws abortion and birth control, the other has free healthcare that covers abortion and birth control.

Since fascism has historically opposed freedom of speech, LCS inevitably has to support all forms of freedom of speech, otherwise it stops being a utopian/dystopian caricature, and starts being an attempt to model the intricate complexities of real world political ideology.

Additionally, seeing as LCS is a criminal organization, it stands to reason that it requires severe loyalty from its members, which largely means there should be very little disagreement over ideology.  The LCS ideology is presumably relatively homogeneous.

295
Curses / Re: LCS Improved Procedural Strings Support (almost)
« on: September 02, 2015, 01:54:12 pm »
I mucked around with refactoring the file on education once and got it down quite a bit, but I didn't commit the edit and I've since lost the file. But from that test edit, I estimate we can knock about 3/4 off a lot of the source code without even putting the data into external files.
So far all I've done is refactoring, so I can see where you're coming from.  There's just so much redundancy...  Very few of the strings are legitimately reused, but once they're all out of the way, it gets a lot easier to simplify the code.

I would like to play the game on Android, however the version for Android is way out of date and would be difficult to update. Rebuilding the whole thing for Android, and doing the same for in-code mods would also be a nightmare. It would be great if we could reduce the hard-coded sections and have more external files for functionality, not just for strings but for logic and options. Then it would be easier to port, and also easier to support mods on multiple platforms.

So I'm definitely interested in a joint effort if you're interested, but we'd have to agree on how to collaborate on the work.
I'm interested, in principle.  You may have noticed my responses tend to be... delayed.  My internet connection is limited, I only have access for eight hours a day, four days a week, three weeks a month.
That said, it's quite consistent.
I'm ambivalent about transferring the logic to external files, as that would make the game largely interpreted rather than compiled, which could make debugging a lot harder, but that is something I've always wanted to learn how to do.
I'm up for it.
Edit: Also, I already know Java, and I hear Android is quite similar.

Will the improved XML support work with the unofficial R855 release of LCS that adds in music and gameplay tweaks?
I took the source code directly from SVN on July 27, 2015.  I am of the impression that is the R855 release of which you speak.
That said, in order to complete the procedural string support, I will need to modify the central game loop and recompile the binary.  Thus, compatibility doesn't mean anything in this context.
That said, improving compatibility is sort of a goal, that's why I'm submitting source files instead of compiled binaries.  So long as the mod in question has not modified the files I submit, they can be swapped out without a hitch.
Unfortunately I will eventually need to modify the game.cpp, includes.cpp, and externs.cpp, which pretty much have to be modified in pretty much every mod, which will break compatibility.

296
Curses / Re: LCS Improved XML Support (almost)
« on: August 20, 2015, 05:46:21 pm »
Congratulation for your change from Java to C, welcome in the halls of true programmers  :D
I'm going to pretend I didn't read that.  -.-;

------
To your main goal: I am not sure, if placing strings in XML files is a good idea, for three reasons:
* It is inefficient. A lot of time and memory is lost for parsing XML files. LCS already produces bloated savegames, because it saves the characters as XML, that becomes noticable, if you have 200 or so sleepers. A good example for this problems in the large scale is also Dwarf Fortress, that takes a lot of time for parsing the raw files, so even the legends mode takes a long time to load.
* It makes translation harder. English has a very simple grammer, and is mostly gender neutral, so it works to put long sentences into constant strings, while almost every other language needs procedually generated strings. Also, XML doesn't accept characters above 127, so theese need a special encodeing.
* It makes moding harder, because modders must learn XML, if it is too often used.
Those are some very good points.  When I was working on converting DF raws to true XML I ran into a bunch of problems with the occasional non-ASCII character, and among other reasons was why I stopped before finishing.
My main concern is that many of the strings contain logic, and I'm concerned about how to store this logic if not in XML.
Worst case scenario, I can store the strings in external files, excluding the ones that use logic.  Mainly I'm hoping to make modding easier and allowing custom strings to be stored and modified without requiring the source to be modified, and especially without requiring the binaries to be recompiled.

I'm sold.  I can probably restructure these entirely without using XML.  It'll actually be easier, come to think about it..

297
Curses / Re: [LCS]Modifying game messages + Compiling LCS Nightly?
« on: August 18, 2015, 05:57:55 pm »
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?
This is actually exactly what I'm working on.  I'm moving most of that stuff into external XML files, that way it won't be necessary to recompile every time you want a few new death messages.

298
Curses / LCS Improved Procedural Strings Support (almost)
« on: August 18, 2015, 05:47:03 pm »
This mod, as it stand, does not change functionality at all.  This is why I'm not submitting the binary yet, just the source.
(Also, whenever I compile the binary, it's about 10MB for some reason, and I don't know how to control the various options, like music support, which likely relates.)

Anyway, in addition to the slightly reduced filesizes of the source, I have extracted most of the data from the various switch statements and placed them in arrays, making the code notably more readable and easier to modify.  This is especially the case with the pickup lines, as now the pickup lines and responses are kept in the same location.

My intention is to move the data from the arrays into external files.  I have successfully done this with "escapes_running" and "escapes_crawling" as a proof of concept (not included), and I hope to have this finished version submitted here in short order.

The notation to be used is ultimately arbitrary, as well as the filenames and locations of the files containing this XML.  My standing intention is to use a new separate folder to hold these various custom strings, the "art/custom_string" folder, and have created a new class CustomString to control and manipulate these strings (not included, but based off the CreatureTypes class).
This new class also requires the modification of "game.cpp", "externs.h" and "includes.h".  I pulled the source from SVN July 27, and am acting under the assumption these files have not been changed since then, but I intend to post in this thread the exact changes I make in those three files, due to their sensitivity.
The reason I am using a custom class for this purpose, as well as storing the data in XML instead of raw strings, is the occasional logic used in manipulating the data.
A specific example is the death message (paraphrased):
Code: [Select]
addstr("mutters last words")
if(liberal){ addstr(slogan)}
else if(moderate){ addstr("plague on both your houses")}
else { addstr("better dead than liberal")}

The XML I was using would list the preceding as follows:
Code: [Select]
<string>
<line>mutters last words</line>
<line2>better dead than liberal<liberal/ = "slogan"><moderate/ = "plague on both your houses"></line2>
</string>

It's not pretty, so I'm open to suggestions for improvement.  The plan is to use a separate file for each set of custom strings.  One for death messages, one for pickup lines, one for when a character is stunned, one for the custom rejection lines for mutants, one for the custom attacks of judges, etc.  There are about 40 of these at my last count.

So yeah, I intend to have a working prototype in the next few days, and if anyone has any pointers, suggestions, or requests I'm happy to hear them.

I do have two questions for anyone able to answer:
1: how do I get the LCS executable's filesize down to the 500KB or so it normally is, rather than the 10MB I keep getting.  I'm using Visual C++ 2010 SP1, I opened the project file and have been running everything on its default setting (I'm a Java programmer by trade, I'm not used to C++ yet).
2: How do I link a C++ header file to a C++ source.  As it stands I can only get my custom class to compile by placing the source code entirely within the header file, "customstring.h".  So far it's ignoring the "customstring.cpp" I also made.  Java doesn't have header files, and my textbook gives the unhelpful advice "consult your compiler's documentation."

Thank you for your time.

tldr;
This source code is easier to read (ideally) and easier to modify (ideally) but doesn't change any functionality.  I intend add XML files for all the custom strings soon.

Edit:
No more XML, just standard strings, as per advice.
I've updated talk.cpp a little bit, and added interrogation.cpp.
I still haven't got anything for external files, but I expect that's going to all go down at once.

http://www.mediafire.com/download/c094hbdquopncin/talk.cpp
http://www.mediafire.com/download/j7ca23ba8k5tc9b/fight.cpp
http://www.mediafire.com/download/pidz8c3fhcklfpn/interrogation.cpp
http://www.mediafire.com/download/ax3mvqntph9haui/justice.cpp (very few changes, as someone got to it first)

And a dated full rip of the SVN for those interested.
http://www.mediafire.com/download/dz0ue0ixk8nc38x/LCS+Source+20150727.rar

Pages: 1 ... 18 19 [20]