Bay 12 Games Forum

Please login or register.

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

Author Topic: LCS 4.12.28 Now With a Save Editor (Custom Flags Coming Soon)  (Read 27614 times)

SlatersQuest

  • Bay Watcher
    • View Profile
Re: LCS 4.12.08 Now With A Save Editor
« Reply #45 on: February 13, 2018, 09:47:47 pm »

Hey I thought I'd pop in and say thank you for your hard work in making LCS more moddable. I haven't checked in on LCS for a long, long time but it's amazing to see the things coders are doing with it. Cheers.

I second this!  :)
Logged

Coronel_Niel

  • Bay Watcher
    • View Profile
Re: LCS 4.12.08 Now With A Save Editor
« Reply #46 on: February 17, 2018, 09:23:44 pm »

Hey, if you update your GIT I can add in some fixes I made to the uni (half the subjects have no effect and the last 4 are missing colouring and text for activity display)

Crash in file ads.cpp line 110.
« Last Edit: February 18, 2018, 11:13:36 pm by Coronel_Niel »
Logged

Rawb

  • Bay Watcher
    • View Profile
Re: LCS 4.12.08 Now With A Save Editor
« Reply #47 on: February 19, 2018, 05:04:47 pm »

Yo, thanks for keeping this game alive.

Will say that I've been getting a load of crashes on both my machines with the latest version, running on both W10 and W8. Anything I could do?

Also, I swear there used to be an auto save function for this game?

Much love <3
Logged

Rezan

  • Bay Watcher
    • View Profile
Re: LCS 4.12.08 Now With A Save Editor
« Reply #48 on: February 19, 2018, 07:55:56 pm »

I'm having the same problems as Rawb, constant crashes, no autosave feature. I might take a look at the code base myself to see if it's fixable if I knew where to start looking.
Logged

IsaacG

  • Bay Watcher
  • Mad Engineer
    • View Profile
    • JJoseph on Deviantart
Re: LCS 4.12.08 Now With A Save Editor
« Reply #49 on: February 20, 2018, 02:26:10 pm »

Hey I thought I'd pop in and say thank you for your hard work in making LCS more moddable. I haven't checked in on LCS for a long, long time but it's amazing to see the things coders are doing with it. Cheers.

I second this!  :)
^.^  :D  ;D  ;)

Ack!  I'm out for one week and come back to four new comments.  That's more than the past year combined ^.^;

Hey, if you update your GIT I can add in some fixes I made to the uni (half the subjects have no effect and the last 4 are missing colouring and text for activity display)

Crash in file ads.cpp line 110.
Funny you should mention ads.cpp, I deleted that file last night.
There's been some serious restructuring the past week.  Moving towards OOP, in the process of removing most "#include"s and "extern"s
Edit: Done.  Updated GitHub.
Yo, thanks for keeping this game alive.

Will say that I've been getting a load of crashes on both my machines with the latest version, running on both W10 and W8. Anything I could do?

Much love <3
<3

I'm having the same problems as Rawb, constant crashes, no autosave feature. I might take a look at the code base myself to see if it's fixable if I knew where to start looking.
By coincidence, I only just fixed the autosave bug.
At the same time, in the "weird fonts" thread, I managed to determine the cause of these frequent crashes, and I'll have it ready tomorrow.
(Many thanks, Coronel_Niel)
« Last Edit: February 20, 2018, 02:40:03 pm by IsaacG »
Logged
LCS 4.12.28 Custom NewGame, Edit Savefile!
Quote
Many people, meeting Aziraphale for the first time, formed three impressions: that he was English, that he was intelligent, and that he was gayer than a tree full of monkeys on nitrous oxide.
Constitution of the Confederate States
Article I Sec. 9 4
No bill of attainder, ex post facto law, or law denying or impairing the right of property in negro slaves shall be passed.

Reelya

  • Bay Watcher
    • View Profile
Re: LCS 4.12.09 Now With A Save Editor
« Reply #50 on: February 20, 2018, 11:33:52 pm »

The code's still pretty horrible ;)

BTW what's with this in many of the header files?

Quote
#ifndef CLIP_H
#define CLIP_H0

Shouldn't that just read "#define CLIP_H" without an added zero? If the symbol being checked here doesn't match the symbol being defined then it defeats the purpose of wrapping the header file in the #ifndef statement, and the code is in fact avoiding the compiler error (which this structure is intended to prevent) just by blind luck.

Also, the whole item system is truly horrendous, with hundreds of unnecessary functions. e.g. most of the "get" methods of the Armor, Weapon classes etc just pass through a call to the ArmorType or WeaponType. This whole level of infrastructure can be abolished pretty cleanly, removing entire forests of virtual functions.
« Last Edit: February 20, 2018, 11:46:54 pm by Reelya »
Logged

IsaacG

  • Bay Watcher
  • Mad Engineer
    • View Profile
    • JJoseph on Deviantart
Re: LCS 4.12.09 Now With A Save Editor
« Reply #51 on: February 21, 2018, 11:46:12 am »

The code's still pretty horrible ;)
Oh, absolutely. ;)
BTW what's with this in many of the header files?

Quote
#ifndef CLIP_H
#define CLIP_H0

Shouldn't that just read "#define CLIP_H" without an added zero? If the symbol being checked here doesn't match the symbol being defined then it defeats the purpose of wrapping the header file in the #ifndef statement, and the code is in fact avoiding the compiler error (which this structure is intended to prevent) just by blind luck.
Strictly speaking, yes, it should read that.  The added zero renders the #ifndef meaningless.
Long ago, before I started work on the code, everything was included in the file "includes.h"  Where everything means everything.  Many headers were, ultimately, included multiple times, but it still compiled because there were "#ifndef" preprocessor statements in every header file.  This made it difficult to determine whether any single header file was actually used by any single cpp file, since commenting out the include statement often times did not prevent it from being included.
Eventually I went through and broke every single instance of #ifndef I could find, which meant the game could not compile if any header was included more than once.  Those were dark times.
But now, the game compiles, and there are no instances of doubly included header files (apart form standard library, like <string> and <functional>, which is fine, honestly).  I'm in the process of eliminating unused code, especially preprocessor statements, and the broken #ifndef keeps it from coming back until I decide I actually need it.

Also, I'm a big proponent of "fail fast" development.  Including the same header file more than once should be avoided in general.  Making such behavior into a compiler error prevents the distribution of code that does it.

tldr; The #ifndef CLIP_H #define CLIP_H0 is, well, junk code left over from a while back.

Also, the whole item system is truly horrendous, with hundreds of unnecessary functions. e.g. most of the "get" methods of the Armor, Weapon classes etc just pass through a call to the ArmorType or WeaponType. This whole level of infrastructure can be abolished pretty cleanly, removing entire forests of virtual functions.
That's next on the list.  I got rid of most calls to "extern vector<Creature *> pool" with a new class "CreaturePool".
So many instances of files that import creature.h just because of a few instances of "addstr(pool[p]->getname())".  And creature.h won't compile unless it's also got a call to items.h because the creature interface includes access to its inventory, which means it also needs weapon.h weapontype.h and loottype.h
It drives me batty.
Item::getItemType(Item item){
return itemType.getItemTypeFromID(item.getID());
}
There is much room for improvement.
Logged
LCS 4.12.28 Custom NewGame, Edit Savefile!
Quote
Many people, meeting Aziraphale for the first time, formed three impressions: that he was English, that he was intelligent, and that he was gayer than a tree full of monkeys on nitrous oxide.
Constitution of the Confederate States
Article I Sec. 9 4
No bill of attainder, ex post facto law, or law denying or impairing the right of property in negro slaves shall be passed.

Gatleos

  • Bay Watcher
  • Mournhold... City of Light... City of MAGIC!
    • View Profile
    • Someone Sig This
Re: LCS 4.12.10 Now With A Save Editor (Fixed recruitment crashing)
« Reply #52 on: February 21, 2018, 03:24:18 pm »

So, 4.12.10 doesn't seem to be allowing me to recruit. I go through the usual process of getting people to "agree to come by later", but the scheduled meetings never activate at the end of the day.

Do you have a git repo? You can probably find whatever the issue is yourself, but I'd still be interested in looking at the changes you've made and possibly contributing.
Logged
Think of it like Sim City, except with rival mayors that seek to destroy your citizens by arming legions of homeless people and sending them to attack you.
Quote from: Moonshadow101
it would be funny to see babies spontaneously combust
Gat HQ (Sigtext)
++U+U++ // ,.,.@UUUUUUUU

Rawb

  • Bay Watcher
    • View Profile
Re: LCS 4.12.10 Now With A Save Editor (Fixed recruitment crashing)
« Reply #53 on: February 21, 2018, 04:25:33 pm »

Same as above, also don't mean to be a downer but I'm still getting crashes. It seems to now be around when I leave a site? Can do some play testing if you want more info.

Keep it up :)
Logged

Rezan

  • Bay Watcher
    • View Profile
Re: LCS 4.12.10 Now With A Save Editor (Fixed recruitment crashing)
« Reply #54 on: February 22, 2018, 08:16:00 am »

I'm having the same problem as Rawb, crashes on leaving sites.
Logged

IsaacG

  • Bay Watcher
  • Mad Engineer
    • View Profile
    • JJoseph on Deviantart
Re: LCS 4.12.11
« Reply #55 on: February 23, 2018, 02:24:04 pm »

So, 4.12.10 doesn't seem to be allowing me to recruit. I go through the usual process of getting people to "agree to come by later", but the scheduled meetings never activate at the end of the day.

Do you have a git repo? You can probably find whatever the issue is yourself, but I'd still be interested in looking at the changes you've made and possibly contributing.
https://github.com/King-Drake/Liberal-Crime-Squad
I'll add a link in the opening post as well.


Same as above, also don't mean to be a downer but I'm still getting crashes. It seems to now be around when I leave a site? Can do some play testing if you want more info.

Keep it up :)
This is a lesson to me.  Never write code when tired.  Let's hope this isn't 4.11 all over again.  I wasn't expecting the sudden influx of interest.

Unfortunately I do not have an internet connection at my home, so responding quickly is not easy.  I'll investigate the changes I've made, and determine which could have resulted in this error.  I'll be on the forums at about this time for the next two days.  I won't be available February 26.  I should be back on February 27.
In the meantime, 4.12.5 (available in the first post) is the stable release for those interested.
Logged
LCS 4.12.28 Custom NewGame, Edit Savefile!
Quote
Many people, meeting Aziraphale for the first time, formed three impressions: that he was English, that he was intelligent, and that he was gayer than a tree full of monkeys on nitrous oxide.
Constitution of the Confederate States
Article I Sec. 9 4
No bill of attainder, ex post facto law, or law denying or impairing the right of property in negro slaves shall be passed.

Rezan

  • Bay Watcher
    • View Profile
Re: LCS 4.12.11 Now With A Save Editor (Allegedly fixed recruitment crashing)
« Reply #56 on: February 23, 2018, 07:56:43 pm »

I'm experiencing problems with recruiting in the newest build, I can convince someone to go to a meeting, but the meeting never shows up. No music version if it matters.

As a sidenote, could I advise you to make the information about savegame editing more prominent? I know it's in the "old features" thing, but you kind of have to dig to figure it out.

Plus, is there a reason *.verbose isn't in a more legible format, like say, xml or json? It would be a piece of cake to make an app in another (simpler) language to edit the savegames if they were (we could host a static react/vue version on github pages for instance, in another repository).
Logged

Coronel_Niel

  • Bay Watcher
    • View Profile
Re: LCS 4.12.11 Now With A Save Editor (Allegedly fixed recruitment crashing)
« Reply #57 on: February 23, 2018, 09:30:30 pm »

The ads.cpp crash was in function displaysinglead (now in news.cpp) on lines:

strcat(ad, pickrandom(personalAds));
and
strcat(ad, pickrandom(personalAdsLG));

both the arrays are empty and crash the game when it tries to pick an ad out. This is the exiting site bug. Apart from that, I had no other crashes.

Recruitment is definitely completely bugged now. No one goes to any meetings. This is new since .08

Other small bugs:

University is bugged. About 4-10 of the new subjects to study either don't add the user to the students pool (so they have no effect) or have some display bugs. Follow ACTIVITY_STUDY_MARTIAL_ARTS and you can see where the newly added activities aren't included in all the places they need to be. Worst offender is in the activities.cpp file.

Just thought I'd help whilst I played through my own playthrough. Far easier to debug when you can stack trace the crash :).

Some thoughts on balance and the like. I've done a few playthroughs over the years and it's definitely different now. They fixed katana wielding dodge squads which kind of makes guns the only effective murder weapon nowadays. Guitar squads might be effective but it feels like this limits your options quite a lot compared to a while ago.

Police seem to hone in onto heated apartments way quicker. Even using the most expensive one, the police found my hackers at around 150 heat consistently. I don't know if this was due to my 5 years of Liberal Guardian abuse (nightmare start) but I remember having way more leeway here.

I don't know if anyone's ever done an interrogation guide (might put something on the wiki if it's editable) but a basic guide to guaranteed 5-6 day conversions is:

To kidnap your victims, go on a date with a 9mm and take them from the first day. This works for any target and means you can infiltrate in and out silently.
You have 2 teams. Beating squad and a converter. Beating squad needs their strength values to add together to around 40-100. They beat the automaton 2-3 times until they have 1-5 Wisdom (depending on strength of converter). If you target has 1 Health, use much less strength as you'll kill them.
Then you switch in the converster. They need high heart (20+) and some psychology skill can help a lot (4-20). Add in a bondage suit and props if you have low values.
If your converter fails to convince them, add in drugs. Drugs can kill the automaton but helps overcome a high business or religion skill.


If I had known how good this tactic is I would've used it ad nauseam. You can have unlimited enlightened subjects and if you keep the leader safe you're golden. Date napping victims with a 9mm never fails and gives you plenty of recruits on nightmare mode.

Best of luck to you, great to see this game going on this many years after it's release!
« Last Edit: February 23, 2018, 10:14:15 pm by Coronel_Niel »
Logged

IsaacG

  • Bay Watcher
  • Mad Engineer
    • View Profile
    • JJoseph on Deviantart
Re: LCS 4.12.11 Now With A Save Editor (Allegedly fixed recruitment crashing)
« Reply #58 on: February 24, 2018, 01:09:32 pm »

I'm experiencing problems with recruiting in the newest build, I can convince someone to go to a meeting, but the meeting never shows up. No music version if it matters.
I don't know exactly what was causing that, so I reverted that file to 4.12.5
It should be fixed in the current nightly build: 4.12.12
Unfortunately 4.12.12 has an unknown number of new bugs.
As a sidenote, could I advise you to make the information about savegame editing more prominent? I know it's in the "old features" thing, but you kind of have to dig to figure it out.
That's fair.  I'll keep it near the top of the opening post.  It is the biggest addition I've made, I understand if it's confusing.
Plus, is there a reason *.verbose isn't in a more legible format, like say, xml or json? It would be a piece of cake to make an app in another (simpler) language to edit the savegames if they were (we could host a static react/vue version on github pages for instance, in another repository).
Mostly it's for the purpose of brevity.  Also because it was crazy easy to program.  The ingame data represented by integers or simple strings are exported as integers and simple strings, then imported in the same order on next reload.

When it was first suggested, it was specifically requested not to be in xml, it was meant to be as easily read as possible.  Lines beginning with '#' are comments ignored by the software, and about everything else is a number value.  I guess I'm too close to it, I have a hard time thinking how to explain it.
The savefiles are saved in xml by default, though the numbers are stored in hexidecimal, so you need a hex editor to modify them straight up.

Personally I consider the save editor low priority.  It's supposed to make modding easier.
I'll gladly implement any changes, if someone else codes them.
I'm kinda indecisive, there are a number of compelling arguments to use xml or JSON, or any number of formats, so I went with what was easiest and fastest to program, that is, no formatting. ^.^;
Logged
LCS 4.12.28 Custom NewGame, Edit Savefile!
Quote
Many people, meeting Aziraphale for the first time, formed three impressions: that he was English, that he was intelligent, and that he was gayer than a tree full of monkeys on nitrous oxide.
Constitution of the Confederate States
Article I Sec. 9 4
No bill of attainder, ex post facto law, or law denying or impairing the right of property in negro slaves shall be passed.

IsaacG

  • Bay Watcher
  • Mad Engineer
    • View Profile
    • JJoseph on Deviantart
Re:
« Reply #59 on: February 24, 2018, 01:34:20 pm »

The ads.cpp crash was in function displaysinglead (now in news.cpp) on lines:

strcat(ad, pickrandom(personalAds));
and
strcat(ad, pickrandom(personalAdsLG));

both the arrays are empty and crash the game when it tries to pick an ad out. This is the exiting site bug. Apart from that, I had no other crashes.
Sonuva...  >:( It's supposed to scan for empty arrays on startup.  That means my automated tests aren't even running properly!   :'(
That's old code, it was supposed to be fixed ages ago.


Recruitment is definitely completely bugged now. No one goes to any meetings. This is new since .08
I gave up trying to figure out what was causing that, so I reverted the changes.
In nightly 4.12.12 that code is back to 4.12.5

Other small bugs:

University is bugged. About 4-10 of the new subjects to study either don't add the user to the students pool (so they have no effect) or have some display bugs. Follow ACTIVITY_STUDY_MARTIAL_ARTS and you can see where the newly added activities aren't included in all the places they need to be. Worst offender is in the activities.cpp file.
I am giving that file a stern talking to as soon as I get home.
Just thought I'd help whilst I played through my own playthrough. Far easier to debug when you can stack trace the crash :).

...

Best of luck to you, great to see this game going on this many years after it's release!
Glad to hear it.  Very glad, this is very helpful.
Thanks.
Logged
LCS 4.12.28 Custom NewGame, Edit Savefile!
Quote
Many people, meeting Aziraphale for the first time, formed three impressions: that he was English, that he was intelligent, and that he was gayer than a tree full of monkeys on nitrous oxide.
Constitution of the Confederate States
Article I Sec. 9 4
No bill of attainder, ex post facto law, or law denying or impairing the right of property in negro slaves shall be passed.
Pages: 1 2 3 [4] 5 6 ... 14