Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 28 29 [30] 31 32 ... 57

Author Topic: Terra Vitae Fork (version 2.0 released!)  (Read 318973 times)

IsaacG

  • Bay Watcher
  • Mad Engineer
    • View Profile
    • JJoseph on Deviantart
Re: Terra Vitae Mod (version 1.2 released!)
« Reply #435 on: June 25, 2017, 07:36:52 pm »

Thanks Isaac

Glad to help.

Yeah the game is really buggy and crashes often please fix soon


[sigh] I hate C++ so much.  Especially Visual Studio 2015.

If you can consistently reproduce the crash, upload your save data from before and after the crash and I should be able to figure it out (if it's the Window's port that's causing the crash).
Logged
LCS 4.12 Thread
https://discord.gg/HYbss8eswM
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 passe

gentzy

  • Bay Watcher
    • View Profile
Re: Terra Vitae Mod (version 1.2 released!)
« Reply #436 on: June 26, 2017, 05:50:53 pm »

Hello,
I compiled a version of the game for linux (I know that's not officially supported) and the games sometimes crashes randomly, but that's not my main issue.

My main issue is that the games ALWAYS crashes when trying to load a save. I've also tried running the windows version on wine, same issue.

Steps to Reproduce:
1- remove ~/.lcs (if you have it)
2- Start game
3- Hit enter a couples times (advanced gameplay options have no effect on the crash), followed by any series of letters (to skip past character history), then enter  to finally generate the world
4- Hit X to close the game
5- Try to restart the game and get a segmentation fault

I've gathered a lot of data to help you debug it:
https://pastebin.com/MPUbjku6 (# are comments I left, ┗❯ is the terminal)
« Last Edit: June 26, 2017, 05:55:10 pm by gentzy »
Logged

IsaacG

  • Bay Watcher
  • Mad Engineer
    • View Profile
    • JJoseph on Deviantart
Re: Terra Vitae Mod (version 1.2 released!)
« Reply #437 on: June 27, 2017, 07:54:26 am »

Quote
No symbol "len" in current context.
That phrase haunts my dreams.  First time I've gotten a chill from reading a debug log.

Hello,
I compiled a version of the game for linux (I know that's not officially supported) and the games sometimes crashes randomly, but that's not my main issue.
https://pastebin.com/MPUbjku6 (# are comments I left, ┗❯ is the terminal)

Code: [Select]
creature/creature.h: #define CREATURE_NAMELEN 40

Code: [Select]
title/saveload.cpp:         fwrite(&lobbies[l]->LobbyName, sizeof(char), CREATURE_NAMELEN, h);
title/saveload.cpp:         fread(&lobbies[l]->LobbyName, sizeof(char), CREATURE_NAMELEN, h);

Looks to me this is the code that needs changing.
A quick fix is to replace instances of "CREATURE_NAMELEN" with the number 40.  Most, maybe all of them.  Definitely its appearances in saveload.cpp

Hopefully that's enough.
Logged
LCS 4.12 Thread
https://discord.gg/HYbss8eswM
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 passe

zaimoni

  • Bay Watcher
    • View Profile
Re: Terra Vitae Mod (version 1.2 released!)
« Reply #438 on: June 27, 2017, 10:08:51 am »

"Quck change" should be just
Code: [Select]
#include "creature/creature.h"
Logged

gentzy

  • Bay Watcher
    • View Profile
Re: Terra Vitae Mod (version 1.2 released!)
« Reply #439 on: June 27, 2017, 02:53:06 pm »

Quote
No symbol "len" in current context.
Code: [Select]
creature/creature.h: #define CREATURE_NAMELEN 40

Code: [Select]
title/saveload.cpp:         fwrite(&lobbies[l]->LobbyName, sizeof(char), CREATURE_NAMELEN, h);
title/saveload.cpp:         fread(&lobbies[l]->LobbyName, sizeof(char), CREATURE_NAMELEN, h);

Looks to me this is the code that needs changing.
A quick fix is to replace instances of "CREATURE_NAMELEN" with the number 40.  Most, maybe all of them.  Definitely its appearances in saveload.cpp

Hopefully that's enough.
Tried switching both instances with 39, 40 and 41, no cigar.

"Quck change" should be just
Code: [Select]
#include "creature/creature.h"
"creature/creature.h" is included by "includes.h" which is included by "extern.h" which is included by "title/saveload.cpp" so that should not be necessary.

EDIT:

Found the issue, lobbies is uninitilized:
Code: [Select]
(gdb) list
952       lobbies.resize(dummy);
953       for (int l = 0; l < len(lobbies); l++)
954       {
955         auto h2 = fopen("lobbies", "r");
956
957          fread(&lobbies[l]->LobbyName, sizeof(char), CREATURE_NAMELEN, h2);
958          fread(&lobbies[l]->LobbyCreatures, sizeof(int), CREATURENUM, h2);
959          fread(&lobbies[l]->LobbyLaws, sizeof(int), LAWNUM, h2);
960          fread(&lobbies[l]->spectrum, sizeof(int), 1, h2);
961          fread(&lobbies[l]->alignment_max_liberal, sizeof(int), 1, h2);
(gdb) print sizeof(char)
$13 = 1
(gdb) print lobbies
$14 = std::vector of length 2, capacity 2 = {0x0, 0x0}
(gdb) print l
$15 = 0
(gdb) print lobbies[l]
$16 = (Lobby *) 0x0
(gdb) print lobbies[l]

EDIT2:
Issue is fixed by adding
Code: [Select]
lobbies[l] = new Lobby;before
Code: [Select]
fread(&lobbies[l]->LobbyName, sizeof(char), CREATURE_NAMELEN, h);
« Last Edit: June 27, 2017, 03:22:19 pm by gentzy »
Logged

SlatersQuest

  • Bay Watcher
    • View Profile
Re: Terra Vitae Mod (version 1.2 released!)
« Reply #440 on: June 27, 2017, 05:04:49 pm »

As I write this post, I am updating the DFFD record to version 1.21 to fix this bug and another one that I found: children[] must also be initialized.

The code should read as follows:
Code: [Select]
      //Children
      fread(&dummy, sizeof(int), 1, h);
      children.resize(dummy);
      for (int c = 0; c < len(children); c++)
      {
         children[c] = new Child;
         
         fread(&children[c]->sire, sizeof(int), 1, h);
         fread(&children[c]->bearer, sizeof(int), 1, h);
         fread(&children[c]->gestation, sizeof(int), 1, h);
         fread(&children[c]->birthday_day, sizeof(int), 1, h);
         fread(&children[c]->birthday_month, sizeof(int), 1, h);
         fread(&children[c]->age, sizeof(int), 1, h);
         for (int i = 0; i < ATTNUM; i++)
            fread(&children[c]->naturalattributes[i], sizeof(int), 1, h);
      }
     
      //Lobbies
      fread(&dummy, sizeof(int), 1, h);
      lobbies.resize(dummy);
      for (int l = 0; l < len(lobbies); l++)
      {
         lobbies[l] = new Lobby;
         
         fread(&lobbies[l]->LobbyName, sizeof(char), CREATURE_NAMELEN, h);
         fread(&lobbies[l]->LobbyCreatures, sizeof(int), CREATURENUM, h);
         fread(&lobbies[l]->LobbyLaws, sizeof(int), LAWNUM, h);
         fread(&lobbies[l]->spectrum, sizeof(int), 1, h);
         fread(&lobbies[l]->alignment_max_liberal, sizeof(int), 1, h);
         fread(&lobbies[l]->alignment_max_conservative, sizeof(int), 1, h);
         fread(&lobbies[l]->alignment_current, sizeof(int), 1, h);
         fread(&lobbies[l]->influence, sizeof(int), 1, h);
      }


Edit: upload complete.
Logged

wafflesoflife

  • Bay Watcher
  • Boy you can't put much here can y
    • View Profile
Re: Terra Vitae Mod (version 1.2 released!)
« Reply #441 on: June 27, 2017, 07:15:56 pm »

Thanks Isaac

Glad to help.

Yeah the game is really buggy and crashes often please fix soon


[sigh] I hate C++ so much.  Especially Visual Studio 2015.

If you can consistently reproduce the crash, upload your save data from before and after the crash and I should be able to figure it out (if it's the Window's port that's causing the crash).
This is the version that won't start https://www.dropbox.com/s/cwj23mgkplxrf7j/Getting%20Started%20with%20Dropbox.pdf?dl=0
and this is a good save https://www.dropbox.com/s/2gf99spl9qbtcyo/saveTV1.1.dat?dl=0
Note these are two different saves if you need it from the same game just ask
Logged
My favourite quote from the holy bible
 (Deuteronomy 22:28-29 NAB)

If a man is caught in the act of raping a young woman who is not engaged, he must pay fifty pieces of silver to her father.  Then he must marry the young woman because he violated her, and he will never be allowed to divorce her.

IsaacG

  • Bay Watcher
  • Mad Engineer
    • View Profile
    • JJoseph on Deviantart
Re: Terra Vitae Mod (version 1.2 released!)
« Reply #442 on: June 30, 2017, 10:32:32 am »

Thanks Isaac

Glad to help.

Yeah the game is really buggy and crashes often please fix soon


[sigh] I hate C++ so much.  Especially Visual Studio 2015.

If you can consistently reproduce the crash, upload your save data from before and after the crash and I should be able to figure it out (if it's the Window's port that's causing the crash).
This is the version that won't start https://www.dropbox.com/s/cwj23mgkplxrf7j/Getting%20Started%20with%20Dropbox.pdf?dl=0
and this is a good save https://www.dropbox.com/s/2gf99spl9qbtcyo/saveTV1.1.dat?dl=0
Note these are two different saves if you need it from the same game just ask
The first link doesn't work, it loads up the dropbox help page.
Ideally they should be from the same game, with the first save as close to the consistent crash point as possible.

In the interim, SlatersQuest made some bugfixes for TerraVitae 1.21.
https://www.mediafire.com/?853k05zx1yzs2cc
Logged
LCS 4.12 Thread
https://discord.gg/HYbss8eswM
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 passe

Tarquin

  • Bay Watcher
    • View Profile
Re: Terra Vitae Mod (version 1.2 released!)
« Reply #443 on: July 01, 2017, 07:59:34 pm »

Hello, I registered an account here so I could report some things to you guys.

Specifically, I'm using the most recent Windows version of Terra Vitae and I've been encountering more than a few issues;

-I've gotten this weird thing where the superhuman rights issue suddenly bugs out, with the text turning yellow and having a red background. The same thing happens to the incumbent president's name, even when said president is replaced by another. Additionally, the description of the issue changes to the Elite Liberal one ("All heroes receive sensitivity training and promote Liberal Justice"), although whenever I encounter any superpowered people, whether actual superheroes or even supervillains who all used to be liberals, they're all universally conservative. Finally, this all seems to be preceded by a law change (the ones that happen at the end of the month) that is geared towards changing the superhuman law to be more conservative, with the law getting everyone voting "yes", even when there's Liberal voters in the houses. I should note that I started on Nightmare mode, where the law was already at it's ultra-conservative point.

-Whenever I expose the NEC, the game immediately crashes the next day. I mean, I'm not even entirely sure it crashes, since it almost seems like it's just closing as though I pressed the X key or something, but whatever's happening, I can't play past exposing the NEC. It's at the point where whenever I open the game to continue, the moment I move onto another day it closes.

-I don't know if this is a bug or not, but I was able to travel to the movie studio, where I could find the President in his oval office and the CCS boss (even after having disbanded the CCS).

-I'm getting the movie notifications turning up while I'm doing the opening questions for my character.
Logged

SlatersQuest

  • Bay Watcher
    • View Profile
Re: Terra Vitae Mod (version 1.2 released!)
« Reply #444 on: July 01, 2017, 10:23:42 pm »

Thanks to Tarquin's bug reports, I have uploaded version 1.22 to the DFFD site (linked on the opening page). Windows users will of course need to wait until IsaacG compiles a Windows version (thanks, IsaacG!).

Note: Among the bug fixes this one correctly uses the right save file. To use your existing games on the new version, you will need to rename the save file from saveTV1.1.dat to saveTV1.2.dat. The file can be found in the ./lcs directory on your computer (or a similar hidden directory for Windows).




Hello, I registered an account here so I could report some things to you guys.

Thanks for the reports!

Quote
-I've gotten this weird thing where the superhuman rights issue suddenly bugs out, with the text turning yellow and having a red background. The same thing happens to the incumbent president's name, even when said president is replaced by another. Additionally, the description of the issue changes to the Elite Liberal one ("All heroes receive sensitivity training and promote Liberal Justice"), although whenever I encounter any superpowered people, whether actual superheroes or even supervillains who all used to be liberals, they're all universally conservative. Finally, this all seems to be preceded by a law change (the ones that happen at the end of the month) that is geared towards changing the superhuman law to be more conservative, with the law getting everyone voting "yes", even when there's Liberal voters in the houses. I should note that I started on Nightmare mode, where the law was already at it's ultra-conservative point.

You're not the first person to have reported this, and I presently have no idea what is causing it. Obviously Superhuman Rights and the presidential alignment are getting set to something outside of the legal range, but I've looked through the code and can't find a likely cause. Can you give a little bit more detail on what causes it to happen so that I can reproduce it?



Quote
-Whenever I expose the NEC, the game immediately crashes the next day. I mean, I'm not even entirely sure it crashes, since it almost seems like it's just closing as though I pressed the X key or something, but whatever's happening, I can't play past exposing the NEC. It's at the point where whenever I open the game to continue, the moment I move onto another day it closes.

Bug found and fixed.


Quote
-I don't know if this is a bug or not, but I was able to travel to the movie studio, where I could find the President in his oval office and the CCS boss (even after having disbanded the CCS).
Bug found and fixed.

Quote
-I'm getting the movie notifications turning up while I'm doing the opening questions for my character.
Not a bug - this is intentional. The choices you make while answering the opening questions affects what those movies are.
« Last Edit: July 01, 2017, 10:25:29 pm by SlatersQuest »
Logged

Tarquin

  • Bay Watcher
    • View Profile
Re: Terra Vitae Mod (version 1.2 released!)
« Reply #445 on: July 04, 2017, 01:18:56 am »

You're not the first person to have reported this, and I presently have no idea what is causing it. Obviously Superhuman Rights and the presidential alignment are getting set to something outside of the legal range, but I've looked through the code and can't find a likely cause. Can you give a little bit more detail on what causes it to happen so that I can reproduce it?

Sorry for the late reply. Unfortunately, I don't think there's much I could tell you that would be of help. I tried playing off of nightmare mode to see if it would occur there, and it didn't, so I guess there's that. Then I tried seeing if it would occur if I didn't do anything on nightmare mode, and it didn't happen, so I guess there must be something I'm doing to trigger it. I guess I could describe my usual play-style; I usually go with the ultra-violent route of building up a small team and then going nuts with M-16s throughout the conservative world. I guess it might be because of the speed of my campaigns that something's going wonky with the code, but that would just be me speculating. It tends to happen somewhere in the middle of the first year, I often don't even notice it happen because I can sometimes skip through the congress stuff so quickly I don't pay attention to what's been passed. Again, there's just not much I actually know about why it happens, so I can't give you anything decisive.

Also, I should mention that there's this "Lead's Office" thing that pops up in the church that seems to be inside the wall. It's right next to the church safe, and whenever I enter the space next to it (in spite of the text seemingly being in the wall), it gives me an encounter, though just a random one, and not anything unique like I would expect. I don't know what's supposed to be there, but it doesn't seem like I should be finding random bunches of yokels, housewives, lawyers etc.

EDIT: Another thing; there's this thing where using the stairs in the prison building will take you inside a wall. Like, you use the stairs on one level, and the exit point is inside a wall. I can move out of the wall, but not back into it, which naturally makes it a really bothersome thing to encounter.
« Last Edit: July 04, 2017, 03:35:53 am by Tarquin »
Logged

Lenin_Cat

  • Bay Watcher
    • View Profile
Re: Terra Vitae Mod (version 1.2 released!)
« Reply #446 on: July 05, 2017, 08:15:10 am »

If I try to build this in linux mint(and yes I have ncurses installed, and I have had this issue on debian and arch!)

Code: [Select]
make[2]: Entering directory '/home/cary/terravitae 1.2/src'
g++ -DHAVE_CONFIG_H -I. -I..  -DINSTALL_DATA_DIR=\"/usr/local/share\"  -I../src -g -O2 -MT crimesquad-consolesupport.o -MD -MP -MF .deps/crimesquad-consolesupport.Tpo -c -o crimesquad-consolesupport.o `test -f 'common/consolesupport.cpp' || echo './'`common/consolesupport.cpp
common/consolesupport.cpp: In function 'int addch_unicode(int)':
common/consolesupport.cpp:246:38: error: 'setcchar' was not declared in this scope
       setcchar(&cch, &wch, 0, 0, NULL);
                                      ^
common/consolesupport.cpp:247:26: error: 'add_wch' was not declared in this scope
       return add_wch(&cch);
                          ^

and if I try to run the windows version in wine:

Code: [Select]
err:module:import_dll Library MSVCP140.dll (which is needed by L"Z:\\home\\cary\\TerraVitae 1.2 For Windows\\crimesquad.exe") not found
err:module:import_dll Library VCRUNTIME140.dll (which is needed by L"Z:\\home\\cary\\TerraVitae 1.2 For Windows\\crimesquad.exe") not found
err:module:import_dll Library api-ms-win-crt-runtime-l1-1-0.dll (which is needed by L"Z:\\home\\cary\\TerraVitae 1.2 For Windows\\crimesquad.exe") not found
err:module:import_dll Library api-ms-win-crt-string-l1-1-0.dll (which is needed by L"Z:\\home\\cary\\TerraVitae 1.2 For Windows\\crimesquad.exe") not found
err:module:import_dll Library api-ms-win-crt-utility-l1-1-0.dll (which is needed by L"Z:\\home\\cary\\TerraVitae 1.2 For Windows\\crimesquad.exe") not found
err:module:import_dll Library api-ms-win-crt-stdio-l1-1-0.dll (which is needed by L"Z:\\home\\cary\\TerraVitae 1.2 For Windows\\crimesquad.exe") not found
err:module:import_dll Library api-ms-win-crt-locale-l1-1-0.dll (which is needed by L"Z:\\home\\cary\\TerraVitae 1.2 For Windows\\crimesquad.exe") not found
err:module:import_dll Library api-ms-win-crt-convert-l1-1-0.dll (which is needed by L"Z:\\home\\cary\\TerraVitae 1.2 For Windows\\crimesquad.exe") not found
err:module:import_dll Library api-ms-win-crt-heap-l1-1-0.dll (which is needed by L"Z:\\home\\cary\\TerraVitae 1.2 For Windows\\crimesquad.exe") not found
err:module:import_dll Library api-ms-win-crt-math-l1-1-0.dll (which is needed by L"Z:\\home\\cary\\TerraVitae 1.2 For Windows\\crimesquad.exe") not found
err:module:import_dll Library api-ms-win-crt-filesystem-l1-1-0.dll (which is needed by L"Z:\\home\\cary\\TerraVitae 1.2 For Windows\\crimesquad.exe") not found
err:module:import_dll Library api-ms-win-crt-multibyte-l1-1-0.dll (which is needed by L"Z:\\home\\cary\\TerraVitae 1.2 For Windows\\crimesquad.exe") not found
err:module:import_dll Library api-ms-win-crt-time-l1-1-0.dll (which is needed by L"Z:\\home\\cary\\TerraVitae 1.2 For Windows\\crimesquad.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"Z:\\home\\cary\\TerraVitae 1.2 For Windows\\crimesquad.exe" failed, status c0000135
Logged

IsaacG

  • Bay Watcher
  • Mad Engineer
    • View Profile
    • JJoseph on Deviantart
Re: Terra Vitae Mod (version 1.2 released!)
« Reply #447 on: July 05, 2017, 01:15:38 pm »



and if I try to run the windows version in wine:

Code: [Select]
err:module:import_dll Library MSVCP140.dll (which is needed by L"Z:\\home\\cary\\TerraVitae 1.2 For Windows\\crimesquad.exe") not found
err:module:import_dll Library VCRUNTIME140.dll (which is needed by L"Z:\\home\\cary\\TerraVitae 1.2 For Windows\\crimesquad.exe") not found
These dll files are needed for any program compiled by Visual Studio 2015, and it's an example of Microsoft making things harder for people without access to Windows Update.  I've seen some success with including those dll files in the same directory as the executable, but I don't know whether that would work with wine.

EDIT: Another thing; there's this thing where using the stairs in the prison building will take you inside a wall. Like, you use the stairs on one level, and the exit point is inside a wall. I can move out of the wall, but not back into it, which naturally makes it a really bothersome thing to encounter.
That's an old bug, and it's actually still present in 4.10 Augmentation (which otherwise fixes many of the bugs present in 4.07 from which TerraVitae is derived).
Fixing it would require rewriting the level generation code for prisons.
Further details:
https://github.com/Kamal-Sadek/Liberal-Crime-Squad/issues/7
Logged
LCS 4.12 Thread
https://discord.gg/HYbss8eswM
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 passe

Lenin_Cat

  • Bay Watcher
    • View Profile
Re: Terra Vitae Mod (version 1.2 released!)
« Reply #448 on: July 05, 2017, 03:10:16 pm »

In that case, what is the make file to compile with mingw-w32?
Logged

Lenin_Cat

  • Bay Watcher
    • View Profile
Re: Terra Vitae Mod (version 1.2 released!)
« Reply #449 on: July 05, 2017, 04:20:11 pm »

Actually do you have the project file? I can just import that into winemaker apparently.

EDIT: I got it to build natively but get a segfault every election.
« Last Edit: July 05, 2017, 08:01:36 pm by Lenin_Cat »
Logged
Pages: 1 ... 28 29 [30] 31 32 ... 57