Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 4 5 [6] 7 8 ... 57

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

botea

  • Bay Watcher
    • View Profile
Re: Mod Planning: Terra Vitae mod
« Reply #75 on: August 12, 2014, 06:30:01 pm »

yes it is the generic message and no I can't click on the details

Sorry I'm not that good at trouble shooting but I'm a pretty good tester with decent skill in this game so I'll be testing this for ya
Logged

SlatersQuest

  • Bay Watcher
    • View Profile
Re: Mod Planning: Terra Vitae mod
« Reply #76 on: August 26, 2014, 03:43:09 pm »

Sorry for the long delay - I've been trying to reinstall stuff on my computer and am only now fully compile-capable again.

I've found the bug - anywhere that the game needs to display new weapons, it causes a segmentation fault. This should be easy to fix. First, though, I've got to reinstall the debugger.
Logged

SlatersQuest

  • Bay Watcher
    • View Profile
Re: Mod Planning: Terra Vitae mod
« Reply #77 on: August 26, 2014, 06:38:13 pm »

Okay, I found where the bug is, but unfortunately, I haven't the foggiest idea how to fix it without completely rewriting some core functions.
Logged

botea

  • Bay Watcher
    • View Profile
Re: Mod Planning: Terra Vitae mod
« Reply #78 on: September 02, 2014, 03:07:23 pm »

Well good luck I not very good at programming so I can't help but I will help look for bugs.
Logged

SlatersQuest

  • Bay Watcher
    • View Profile
Re: Mod Planning: Terra Vitae mod
« Reply #79 on: September 09, 2014, 02:36:31 pm »

Okay,

I need to move on with this. I was hoping that Liberal Elitist would be able to look at the code in this thread and find out what is causing the segfaults, but he hasn't so we need another solution. I am uncertain on the best way to do this, so I am going to make a poll for you guys and gals to give me suggestions.

Option #1. Hard-code the accuracy and damage of magic, powers, and powersuit blasters when using martial arts attacks.
----Pros: weapons will behave the way I intend them to, being ammo-less and useable only with appropriate skills or equipment
----Cons: weapons will be completely unmoddable except by modifying the .cpp files and recompiling (not available in XML code)

Option #2. Create weapons to go with the skills (magic wands, superhero gloves, powersuit blasters), which will behave like any other weapon.
----Pros: Since all other weapons behave this way, fairly easy to code, and easy to mod
----Cons: Will need to code restrictions on equipping these weapons, which may cause more bugs

Options #3 and higher. Any suggestions from the peanut gallery?
Logged

Liberal Elitist

  • Bay Watcher
  • I'm more liberal than you are!
    • View Profile
    • The Liberal Crime Squad wiki
Re: Mod Planning: Terra Vitae mod
« Reply #80 on: September 10, 2014, 07:01:19 am »

Okay,

I need to move on with this. I was hoping that Liberal Elitist would be able to look at the code in this thread and find out what is causing the segfaults, but he hasn't so we need another solution. I am uncertain on the best way to do this, so I am going to make a poll for you guys and gals to give me suggestions.

Sorry, I hadn't noticed that thread was updated since my last post there. I'm actually not that good at fixing segfaults, they are like mystery bugs, hard to find the source of them in many cases. I did list the possible ways they can happen. I'll take a look at it. I'm kinda low on hard disk space so actually downloading your source code and compiling and building it, well I probably have enough disk space, I'm not sure. I have some computer problems of my own... my computer is a little old and its disk space isn't very big. I will need to upgrade to a better machine soon and just as with you it'll take me awhile to set it up correctly with all the programs I use. But that won't happen for awhile since I have a vacation overseas coming up soon (late September and early October) and my computer upgrade will be after that. And I probably won't be online or able to program during that upcoming vacation.
Logged
The Liberal Crime Squad wiki is your friend.

Quote from: Lielac
Edit: Figured it out via a little bit of trial and error and oH MY GOD WHAT IS THIS MUSIC WHAT IS THIS MUSIC WHAT THE HECK IS IT SPACEBALLS MUSIC? WHATEVER IT IS IT IS MAGICAL

SlatersQuest

  • Bay Watcher
    • View Profile
Re: Mod Planning: Terra Vitae mod
« Reply #81 on: September 10, 2014, 09:39:17 am »

Thanks! I don't mean by the way to sound like I'm demanding anything - but I do want to move so that I can develop a new release (including fixing the existing bugs) :)

In the mean time, I am going to explore some additional possibilities; I think I'll start with magic wands. What I want to do is make an item and presumably edit Creature::give_weapon() to prevent a weapon from being equip-able without certain criteria being met (in this case, the wielder having Magic skill).
Logged

Liberal Elitist

  • Bay Watcher
  • I'm more liberal than you are!
    • View Profile
    • The Liberal Crime Squad wiki
Re: Mod Planning: Terra Vitae mod
« Reply #82 on: September 10, 2014, 01:39:57 pm »

Thanks! I don't mean by the way to sound like I'm demanding anything - but I do want to move so that I can develop a new release (including fixing the existing bugs) :)

In the mean time, I am going to explore some additional possibilities; I think I'll start with magic wands. What I want to do is make an item and presumably edit Creature::give_weapon() to prevent a weapon from being equip-able without certain criteria being met (in this case, the wielder having Magic skill).

I think I fixed yer code, the fix is in the thread where ya posted it: http://www.bay12forums.com/smf/index.php?topic=134139.msg5649781#msg5649781

So that oughta end all this segfault business. Basically the point is, use references instead of pointers, and make the functions static instead of const. References are safer than pointers since they can't be null and also the data will be stored in-place where the variable is declared in the function, rather than allocated on the heap using the "new" operator.

Secondarily, makin' the functions static rather than const means... well this'll take multiple sentences. By default functions in a class are "methods" that are attached to a specific object of that class, a specific instance, for which all the member variables are defined as well as the "this" operator. A const function which has the word "const" at the end of the function declaration is a class method that promises not to alter any of the member variables of the current instance of the class (the current object, "this"). A static function is a function belonging to a class but which does not belong to any object of that class and can be called by using the class namespace and the :: operator, without even using an object of that class, and a static function is not tied to any instance of the class.

So a local variable declared in a static function will only be declared once for the entire class (for instance the local variable naked in armor_none() is only declared once in the Creature class), whereas a local variable declared in a non-static member function, including a const function, is declared separately for every single object of that class.

Now, each of those objects of the Weapon class you created in weapon_magic(), weapon_powers(), and weapon_suit() was created on the heap using the "new" operator rather than created locally using a reference (meaning, you are obligated to delete them later on, every call to "new" must be paired with a call to "delete" in C++ memory management and you failed to do this), and moreover you were creating a new object of the Weapon class for each of those 3 functions for every single object of the Creature class rather than just doing it once for the entire Creature class by using a static function. In the best case scenario this type of coding would lead to a memory leak but not crash the program and in the worst case scenario it would case a segfault.

It caused a segfault.

Anyway I gave ya the code to fix it... just try to remember what a static member function for a class is, and try to remember the difference between a reference and a pointer, and try to remember how calls to the "new" operator need to be paired with calls to the "delete" operator in C++ memory management. "New" is called right before you need to use something the first time and "delete" is called once you're done with it and don't need it anymore. Using the "new" and "delete" operators along with pointers without bein' too careful, and without knowin' how often a function will be called and how often the variable'll get declared, that's a bit of a pickle.

Another little problem: the variables are declared as static in the function. That means the first time the function gets called those variables get initialized to that value, but then they stay at that value and don't get set, future times the function is called. But if ya declare a static variable in a non-static member function, like you did, what does THAT do?

... thinking ...

I don't even know what that does! I tried thinkin' bout it and even with my C++ knowledge it makes my head hurt! But what it does is probably not anything good. If you're declaring static variables, the function you declare 'em in had best be static too! And if the function is NOT a member of a class then that means it's static by definition... a static function means a function not tied to a specific object of a class.

Wow I reckon this C++ sure can be confusin' at times! Now if ya noticed how I implemented music in recent revisions, I declared a class called MusicClass, which only has one object, declared in both game.cpp as a global variable in that file and externs.h as a global variable that is external, and it isn't a pointer to an object of that class that must be created with "new" and destroyed with "delete", but rather, an object of that class created directly without any pointer stuff (so it's sorta like a reference, in that it can't be NULL, except for the fact that it isn't a reference, it's even simpler, it's just an ordinary variable of that class). This means no memory management mumbo jumbo and no chance of segfaults or memory leaks or any of that nonsense.

Now there are plenty of times pointers ARE needed. Like if you have an array of objects your array is typically an array of pointers to objects. Unlike references, you are allowed to set pointers to equal NULL, and unlike references, you can change what they point to, whenever you feel like it, in fact you have a great deal of freedom what to do with pointers, which is a double-edged sword. While pointers are quite versatile indeed they allow you to do all sorts of Very Bad Things that are likely to crash your program. The main reason C++ is faster than Java is pointers and having the programmer take care of memory management instead of having automatic garbage collection. The main reason Java is safer than C++ and less likely to crash is Java doesn't have pointers and it does automatic garbage collection instead of having the programmer do memory management.

Anyway, if ya keep using C++ you're gonna have to get used to this sorta stuff... it's what makes C++ so fast but also so easy to make programs that crash. By usin' my solution with references instead of pointers and avoiding calling "new" and making the functions static, you're takin' advantage of some C++ features designed to make things easier and avoid stuff crashin' too often. That's the whole reason C++ introduced references, which weren't in ANSI C... to prevent crashes and segfaults. Most of the time when yer havin' segfaults you can fix it by thinkin' "Hmm can I do this usin' references instead of pointers?" and then doin' it using references instead of pointers. And if ya can't do it usin' references instead of pointers, well then be sure to do your memory management perfectly and not dereference any pointer that's uninitialized or NULL... that takes a bit more work.

The current code for Liberal Crime Squad is a mishmash of all different coding styles with some stuff using references and other stuff using pointers, some stuff using object-oriented C++ style code and other stuff using old-fashioned low-level C style code. I've been gradually moving the code in the direction of object-oriented C++ style code that uses references instead of pointers but quite gradually indeed so there's still a TON of pointers in the code... in some cases pointers are just a more efficient way of doing things because you can change their values and they are allowed to be NULL and sometimes you actually WANT them to be NULL, in order to symbolize the idea of an object not existing, something you can't do with references.

Now if ya don't like this sorta stuff I reckon yer best off quittin' C++ and switchin' to Java or somethin' else like that, some language that doesn't have pointers, does all the memory management for you automatically, and thus doesn't have segfaults. There's a bunch of other high-level languages besides Java that also take care of all that stuff for ya and make things safe so that segfaults are pretty much impossible. But if you're programming in C or C++ than this sorta thing is just something you have to get used to, it comes with the territory of using language that has low-level features. C is a low-level language but C++ is a multi-level language that can be both low-level AND high-level depending on how you use it. That's part of what makes C++ so insanely versatile... and I really would call C++'s versatile design somewhat insane. Another thing about C++ that is insane is all the parts of it that aren't standardized, even if your compiler follows the official standard, things that are so obvious as things that should be standardized, like how many bits of data the "int" type takes up. Usually it's 32 but it could be 16 or 64 on some compilers and systems, and I think there's even some strange compilers for strange systems where it's 128. That type of stuff is why although C++ is a cross-platform language supported by almost all platforms, making C++ programs actually WORK on different platforms is often quite a pain... plus there's also the big-endian vs. little-endian problem in C and C++, something that really high-order languages hide from you but C and C++ don't. There are some places in the code of Liberal Crime Squad where a number is shifted right 1 bit to divide it by 2, or shifted right 2 bits to divide it by 4... this is endian-dependent and won't work on all platforms, since on platforms with opposite endianness, you need to switch right sifts and left shifts around.

So basically to summarize, anyone programming in C or C++ is just askin' fer trouble from their computer, just askin' for strange odd bugs to occur that they have a hard time replicating, and all sorts of weirdness. But that's also why C and C++ are so popular, since they MAKE you be a good programmer. In other languages that are higher-order, like Java, the compiler will catch almost all your mistakes and tell you what you did wrong, and treat you like a little kid. But C and C++ is grownup stuff, it's for people who aren't afraid of bugs and want to become good programmers. It's the same reason I'm still nostalgic for DOS... DOS was an operating system for adults, not kids, it was an operating system for people who knew what they were doing. DOS let any program do anything at all it wanted with no limitations... access any location in memory, directly communicate with any hardware device... you name it. UNIX-based operating systems and Windows NT-based operating systems, on the other hand, limit the rights and abilities of all programs, granting them some abilities but not others, and not allowing them to communicate with hardware unless they're in kernel mode, and not letting them access memory outside what is allocated to them or any shared memory they have permissions for. Using C or C++ is like using DOS... you are able to do more things and have more control, and not be as limited. Of course I only have this DOS nostalgia because I wrote programs for DOS back when I was a kid and enjoyed how I could write things to communicate directly with hardware and do all sorts of neat stuff that isn't allowed at all in modern operating systems that have security and limit the rights of user-mode programs. The great downfall of the DOS architecture is that a malicious or badly-designed program can destroy everything, typically requiring you to restart the computer if a program crashes, but a truly malicious program in DOS can do any evil thing it wants with no way to protect against this. This is also true of both Windows 3.1 and earlier, and Windows 95/98/ME, which are all DOS-based and share these same architectural weaknesses (thus causing the ubiquitous Blue Screen of Death of those Windows versions, as well as the constant memory leak in those Windows versions that would require you to restart the computer every few days to keep from running out of memory, since if you ran a program that had a memory leak in it, that memory would remain allocated and not be usable after the program terminated, quite an immense flaw indeed).
Logged
The Liberal Crime Squad wiki is your friend.

Quote from: Lielac
Edit: Figured it out via a little bit of trial and error and oH MY GOD WHAT IS THIS MUSIC WHAT IS THIS MUSIC WHAT THE HECK IS IT SPACEBALLS MUSIC? WHATEVER IT IS IT IS MAGICAL

Liberal Elitist

  • Bay Watcher
  • I'm more liberal than you are!
    • View Profile
    • The Liberal Crime Squad wiki
Re: Mod Planning: Terra Vitae mod
« Reply #83 on: September 11, 2014, 04:17:43 pm »

Sorry about that last comment, it was too long, the point of it was, C and C++ programming is a bit hard and prone to errors like segfaults that higher-level languages don't have as problems, and using C++ is somewhat akin to still using DOS which has no security features and is similarly designed in an old-fashioned way, but both of them provide advantages to the programmer and give you more power over things than using a newer language or newer operating system. I really could have put that MUCH more succinctly. It was kind of off-topic too. I get carried away sometimes. But sometimes it is a good thing, if I get carried away when I am programming I can get a TON of stuff done.

Anyway back on the topic of Terra Vitae I downloaded the source code for version 0.1 and have played with it a bit and fixed a few very minor bugs and fixed the compiler warnings and gotten it to compile correctly for Code::Blocks on Windows using strict ANSI settings (which are useful for catching more bugs). But I haven't yet found the cause of this major bug, this segfault thing. I would like to have up-to-date source code so that I can try fixing things with the latest version of the code (SlatersQuest mentioned version 0.2 is almost ready so I'd please like the latest code for that so I can try fixing it, as well as any of xyr thoughts on where xe thinks the big bad segfault bug is). I also would like for people to explain to me how to duplicate this segfault bug please.

Thank you.
Logged
The Liberal Crime Squad wiki is your friend.

Quote from: Lielac
Edit: Figured it out via a little bit of trial and error and oH MY GOD WHAT IS THIS MUSIC WHAT IS THIS MUSIC WHAT THE HECK IS IT SPACEBALLS MUSIC? WHATEVER IT IS IT IS MAGICAL

SlatersQuest

  • Bay Watcher
    • View Profile
Re: Mod Planning: Terra Vitae mod
« Reply #84 on: September 11, 2014, 06:23:58 pm »

The segfault happens when you look at the character's sheet when the character's weapon would be either magic, powers, or powersuit blasters. It does not blow up when given any of the new clothing types (e.g. a superhero costume does not cause a segfault, so a Batman-esque "natural" superhero does not cause a segfault), only the new weapons.

It also works fine when looking at the equipment for a squad as a whole, including print the weapons appropriately (e.g. a superhero with a power suit and no weapons will show up as being armed with blasters when listing all weapons in the squad, but actually looking at a character sheet will cause a segfault).

Incidentally, you can use the diagnostics cheat code to speed things up: go into the review mode on any liberal (review mode, not looking at a liberal's sheet from another location), and change the liberal's name to "Cheat Test Super". This will create a randomly-generated superhero follower of the character. Try this as many times as you want until you get one with an appropriately segfauting-weapon.
Logged

Liberal Elitist

  • Bay Watcher
  • I'm more liberal than you are!
    • View Profile
    • The Liberal Crime Squad wiki
Re: Mod Planning: Terra Vitae mod
« Reply #85 on: September 12, 2014, 02:20:54 pm »

Incidentally, you can use the diagnostics cheat code to speed things up: go into the review mode on any liberal (review mode, not looking at a liberal's sheet from another location), and change the liberal's name to "Cheat Test Super". This will create a randomly-generated superhero follower of the character. Try this as many times as you want until you get one with an appropriately segfauting-weapon.

That doesn't seem to do anything when I try it. Maybe I am doing it wrong. I am using version 0.1 of Terra Vitae. According to the source code I currently have, additionalchars.cpp defines the following cheat codes:
Code: [Select]
    //Index:
    //Add Juice ("Juice Me")
    //Crimes ("Clear My Name")
    //Age ("Set Age")
    //Embezzle funds ("Embezzle <Amount of money>")
    //Siege ("<Faction> Attack Me")
    //Pacify ("Pacify <Faction>")
    //Change View ("<Liberalize/Conservativize> <View>
    //Change Law ("Legislate <+/-> <Law>")

It doesn't list the one you mentioned and I can't find it listed in the source code and it doesn't work when I try it. Actually I tried the cheat codes that ARE listed in the source code and I can't get them to work either. I must be doing it wrong. I know they are case-sensitive (it'd be better if they weren't, I could fix that), but for some reason it isn't working. I think I am changing the names in the wrong place. I am doing it in review mode, yes, and I am using the correct case. But for some reason it isn't working. I don't get it. And I am doing this with a binary version of Terra Vitae 0.1 I compiled and built myself. Well I will try and figure out what is going on here, but something is confusing me. I am looking at the source code and playing the game at the same time and entering cheat codes in the place where, according to the source code, I should do it, but nothing happens, even though according to my reading of the source code, something very much should be happening.

I am very confused by this. I will see if I can figure it out but for some reason I haven't figured it out yet. And I know for a fact I'm playing the Terra Vitae mod because it has extra skills listed on the skills page, extra laws you can break listed on the laws broken page, and extra legal issues listed on the status of the Liberal agenda screen, among other things. Plus it doesn't have the Code Page 437 graphical enhancements I've done the last few months or any other stuff I added the last few months. So I know for a fact I'm playing the Terra Vitae version. But I can't get the cheat codes to work.

On the bright side the game hasn't crashed yet, no segfaults or anything, and not getting cheat codes to work is the only real "bug" I've encountered so far... I will try to figure out what I'm doing wrong here.

Oh and I noticed that in the cheat code function it uses the string "123456789" a bunch of times when that leaves out the digit 0, it really ought to say "0123456789" or "1234567890" to have all 10 digits. Oh yeah and a minus sign for negative numbers so "-0123456789" would be best.

But going into review mode and changing my name to "Cheat Set Age 11" doesn't work even though it ought to under the source code. "Cheat Attack Me CCS" doesn't do anything either. Neither do a bunch of others I've tried. But according to what I've seen in the source code, the exact same source code I compiled and built the executable of the game I am playing, both of those should definitely work. I don't get it. This is frustrating me. I can get the game to compile and build without any errors but I can't figure out this cheat code thing. I am really starting to understand my own limitations in understanding source code by looking at it...

Oh wait I just tried "Cheat CIA Attack Me" and it worked! Ah! Finally a breakthrough... OK so I managed to get one cheat code working... gawd I am so confused right now. I don't know how much help I can be to you, I feel pretty stupid right now.

Ah I just figured something out! Your code where you try and check if strtol() had an error is wrong... well OK, it might work correctly on some platforms but not on others. The reference for it here http://www.cplusplus.com/reference/cstdlib/strtol/ doesn't say anything about it returning a null pointer when successful, but your code assumes it should return a null pointer when it's successful and return a non-null pointer when it fails. That is not actually the function's behavior! The function sets it to point to the next character in the string after the numerical value. So if the next character is a "NUL" character (CP437 character #0, expressible as '\0' in C/C++), it'll return a pointer to that character, or maybe it'll return a NULL, it depends on the implementation, this particular implementation detail for strtol() is not standardized cross-platform. It seems the implementation on Windows is different from the one on Mac OS X. Oh, and you use TWENTY for the base! TWENTY! Who ever heard of that? If people type in numbers they are typing in base TEN numbers! Your calls to strtol() are all messed up...
« Last Edit: September 12, 2014, 03:52:09 pm by Liberal Elitist »
Logged
The Liberal Crime Squad wiki is your friend.

Quote from: Lielac
Edit: Figured it out via a little bit of trial and error and oH MY GOD WHAT IS THIS MUSIC WHAT IS THIS MUSIC WHAT THE HECK IS IT SPACEBALLS MUSIC? WHATEVER IT IS IT IS MAGICAL

SlatersQuest

  • Bay Watcher
    • View Profile
Re: Mod Planning: Terra Vitae mod
« Reply #86 on: September 12, 2014, 07:53:02 pm »

Well, I don't know what the heck happened :o - I did upload a new file, but downloading it again, I find that it is, indeed, the wrong version. I have uploaded it twice now, and tested it out on DFFD - and now, finally, it's the right (0.11) version. I had forgotten that the cheat codes were in v.0.1 at all... in 0.11, I found the bugs you did, and fixed them. They should work, now... (and they do, on my machine)

Some of the cheat codes require additional notes, though (for example, CCS Attack Me will only work if the CCS are already activated and not defeated, although there are codes that take care of that, now, too). They're not 100% ready yet, which is why I haven't publicly "released" them yet, but "Cheat Test Super" should work, now (at least it does on my machine).

I am sorry about the confusion - I had no idea that DFFD hadn't updated the file when I gave them the new file! :(
« Last Edit: September 12, 2014, 07:56:30 pm by SlatersQuest »
Logged

SlatersQuest

  • Bay Watcher
    • View Profile
Re: Mod Planning: Terra Vitae mod
« Reply #87 on: September 14, 2014, 01:58:48 pm »

Well, this is interesting...

Quote
Superhero fires a super-blast at Hillary Zimmermann
 Superhero hits the head BLOWING IT APART!


Evidently, the new weapons WORK - they just need to display correctly without causing segfaults!
Logged

Liberal Elitist

  • Bay Watcher
  • I'm more liberal than you are!
    • View Profile
    • The Liberal Crime Squad wiki
Re: Mod Planning: Terra Vitae mod
« Reply #88 on: September 14, 2014, 09:32:40 pm »

Hey, I'm kinda heavily working on your code from version 0.11. If you make any major changes to the code please keep track of what you've changed since 0.11 very carefully. I am fixing bugs in it and getting it up to date and merged with more recent SVN releases, 1 by 1. I'm going to get it synchronized with the latest version of the vanilla LCS code... currently I am up to revision 762, having started at 739. I got to get it up to date with the newest revision, which is now 846. I've already merged in all the features and bugfixes from revisions 740-769 and I'm really getting the hang of it, I think I'll be able to get it merged with the latest revision... just try not to change too much code because I am doing lots of work on the code and I'd need to know in detail what the changes are.

How am I doing this you ask? Simple, I downloaded SVN revision 739, the one yours is based on, then moved in your source code files, fixed up a bunch of stuff, then have been updating it to the next SVN revision, 1 by 1, fixing conflicts when necessary. Well actually it's a bunch of work. Anyway if you change anything from the 0.11 code you need to document it well.

A side benefit of getting your mod up to date with the latest code is, that will make it easy to use code from your mod in the vanilla game. And another benefit is you have all the latest features and bugfixes in your mod. So it's a win-win for both the mod and the main project since it makes it easier for them to share code.

Your indentation is rather, uhm, different than what the code for the vanilla game uses. It uses indents of size 3 (not 4), made up of spaces (not tabs). You seem to mostly use indents of size 4 made of spaces, and sometimes add unnecessary whitespace. Anyway when I am updating it from one SVN revision to the next the whitespace needs to match up so it can merge the changes from the files more easily. So I've, uhm, standardized most of your whitespace to be like the rest of the game, since it's kinda necessary for updating the code, and makes it more readable. I fixed a bunch of little bugs here and there already. Your mod has plenty of neat stuff in it. I hope to get it synchronized soon and package all the code in a .zip file and make it available for download to you and everyone else, then you can update the mod based on the enhancements I contribute (which is why you need to keep close track of anything you change from 0.11, so you can apply those changes to the version I will put out). I'm not sure if I should put the version out to the general public or just send it privately to you. I don't see any harm in sharing it with the general public so that's what I'm leaning towards, as soon as I finish this, but if you want me to send it directly to you so that you can put out the next official release yourself, I could do that too.

Anyway I'll probably post it online with a download link as soon as I'm done, and then you can download that code and use it for your codebase. Also, once I get Terra Vitae updated to the latest SVN revision, I'll probably have some fixes and enhancements FROM Terra Vitae (which you, SlatersQuest, have fixed and/or improved) that I will put into the vanilla game as the NEXT SVN revision. I don't intend to make both codebases the same or anything like that, they are both separate forks of the game and there are definitely things in Terra Vitae that I don't think belong in the vanilla game (e.g. Terra Vitae, superheroes, Amerindians, and magic), but there are also some things in it that might work well in the vanilla game (more minor stuff). I am not sure if there is anything in the vanilla game you don't want in Terra Vitae... probably you will want all of its features, but the 2 main ones added since the revision you based it on are music (either MIDI or Ogg Vorbis) and Stalinist mode. For now I'll assume you do want those features included... and include them, unless you don't want them included, in which case please tell me.

Also I need to know whether or not to include the Ogg Vorbis music, if I'm including music, since it makes the download for the whole thing much bigger... MIDI doesn't. If you don't say anything I'll go ahead and include it because after you download it you can always delete the entire /art/ogg folder and all its contents if you want to free up that space and not have the Ogg Vorbis music, but if I left it out intentionally it might be harder for you to include it if you actually DO want it. So if I include it that will probably make it easier on you, I think.

Not that you should stop looking for the cause of the segfault... keep on doing that! You seem to be well on the path to solving that bug, much closer than I am! I am more focused on updating it to more recent SVN revisions one by one and merging the code each time, at least right now. Once I am done with that I might try and solve the segfault thing but I think it's likely you'll beat me to it. ;D

Update: Wow I finally got your Terra Vitae mod up to date with the latest SVN version, currently 847 by nickdumas. I started out at revision 739 and mostly went one by one except for when there were revisions that just changed one file at a time, then I did several at once. I managed to deal with all the conflicts and merge all the code to have both your Terra Vitae code and the latest bugfixes and features from the SVN revisions merged together very carefully.

But I haven't tested it or even tried compiling it yet. I'll do that next.
« Last Edit: September 15, 2014, 03:57:38 am by Liberal Elitist »
Logged
The Liberal Crime Squad wiki is your friend.

Quote from: Lielac
Edit: Figured it out via a little bit of trial and error and oH MY GOD WHAT IS THIS MUSIC WHAT IS THIS MUSIC WHAT THE HECK IS IT SPACEBALLS MUSIC? WHATEVER IT IS IT IS MAGICAL

SlatersQuest

  • Bay Watcher
    • View Profile
Re: Mod Planning: Terra Vitae mod
« Reply #89 on: September 15, 2014, 10:11:30 am »

Wow, that is a lot of work; I was assuming I'd have to do all of that myself (although, in a way, glad that you're helping with that, since I don't know the old code as well as you, and have to spend effort figuring out what it's doing in each place). I have made some changes since 0.11, but all of the substantive changes are in the additionalchars.cpp that I added to the game (in particular, there is now a function that deals with the possibility that the just person you recruited to the LCS happened to be married prior to recruitment).

What features are you including in the SVN vanilla version? I know I fixed the dating bug. Go ahead and include the .ogg music.

As for the segfault, while I know what line of code is causing it, I honestly have no idea how to solve it. It requires understanding of C++ terminology that I don't.

I'm honestly considering just commenting out the references to functions that are responsible for the segfault, and write my own code to do the same thing that doesn't crash the game...
Logged
Pages: 1 ... 4 5 [6] 7 8 ... 57