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 - SlatersQuest

Pages: 1 ... 35 36 [37] 38 39 ... 46
541
Curses / Re: Running President
« on: September 22, 2014, 08:34:34 am »
There are two more ways: killing somebody in one of your bases, during a siege (as long as it's not a police/national guard/army/navy siege). So CCS, CIA, hicks, etc. Again, violent, but legally violent.

The other way is through sleeper snooping: snooping for secrets is actually not a crime. Your sleepers will not get charged with anything nor be arrested if caught snooping. They can be fired, but that just forces your sleeper to become an active LCS member instead of a sleeper.

Lastly, if somebody gets juice for any reason, xyr contact also gets 20% of the juice gotten. This means that you can juice somebody by having xyr recruits commit crimes without the contact committing any crimes at all. Hacking is extremely good at this; if you recruit five hackers and have them start hacking (in a different safehouse, preferably), then your founder will probably have 200 juice and a clean rap sheet by the time that the cops arrive. Your hackers will do hard time, but they'll have enough juice not to rat out your leader, so xe'll be safe.

542
Curses / Re: Learning bug in latest version?
« on: September 22, 2014, 08:28:15 am »
Argh - I will look for that and see if I can change it in the config file. If it is... grumble...

Thanks for the heads-up.

543
Curses / Re: Learning bug in latest version?
« on: September 20, 2014, 07:55:13 pm »
Special characters display properly. The GCC compiler doesn't like them, though (it spews out warning messages).

544
Curses / Re: Mod Planning: Terra Vitae mod
« on: September 19, 2014, 10:29:22 pm »
That was, indeed, the bug! :)

Version 0.2 is released!![/u] (link to top thread)

Major changes:
-Fixed the bug that caused the new weapons (magic, super powers, battle suit blasters) to crash the game!
-Added a wide number of cheat/debugging codes (to be further documented and expanded in next version)
-Added most of the new professions/character/creature types to the game
-Updated to current version of LCS with Stalinist features and many other tweaks (thanks to Liberal Elitist)

More minor changes:
-Recruits can sometimes be married. Their spouses can join the LCS as love-slaves!

More to come:
-Port 0.2 to Windows
-Expand debug codes for making scenarios (ever want an elite liberal Congress, an arch-conservative president, and a supreme court that is, to a man, Stalinist?)

Next planned update:
-New locations!


*


Re: illegal characters -

 - Everything I've done so far has been with gcc. I've never used Clang.

Upon further inspection, I am discovering the following: gcc issues lots of warnings about illegal characters. However, in-game, these characters display correctly.


545
Curses / Re: Mod Planning: Terra Vitae mod
« on: September 19, 2014, 05:37:19 pm »
Okay, I think I may finally know what is going on. Please read this and verify if this sounds right!

In Creature.h:
Code: [Select]
class Creature
{
...
bool is_armed() const { return get_weapon().get_itemtypename()!="WEAPON_NONE"; }
...
}


And in Creature.cpp:

Code: [Select]
Weapon& Creature::weapon_none()
{
   static Weapon unarmed(*weapontype[getweapontype("WEAPON_NONE")]);
   return unarmed;
}

Weapon& Creature::weapon_magic()
{
   static Weapon magic(*weapontype[getweapontype("WEAPON_MAGIC")]);
   return magic;
}

Weapon& Creature::weapon_powers()
{
   static Weapon powers(*weapontype[getweapontype("WEAPON_POWERS")]);
   return powers;
}

Weapon& Creature::weapon_suit()
{
   static Weapon battlesuit(*weapontype[getweapontype("WEAPON_BATTLESUIT")]);
   return battlesuit;
}

...

Weapon& Creature::get_weapon() const
{
    //Terra Vitae: modified to account for magic
   if (!is_unarmed())
       return *weapon;
   else if (get_skill(SKILL_MAGIC) > 0)
       return weapon_magic();
   else if (get_skill(SKILL_POWERS) > 0)
       return weapon_powers();
   else if (get_armor().get_itemtypename() == "ARMOR_BATTLESUIT")
       return weapon_suit();
   else
      return weapon_none();
}

...

string Creature::get_weapon_string(int subtype) const
{
   string r;
   if(is_armed())
   {
      r = weapon->get_name(subtype);
      if(weapon->uses_ammo())
         r += " (" + tostring(weapon->get_ammoamount()) + "/" + tostring(count_clips()) + ")";
      else if(weapon->is_throwable())
         r += " (1/" + tostring(count_weapons()-1) + ")"; // -1 so not to count weapon in hands.
   }
   else if(len(extra_throwing_weapons))
   {
      r = extra_throwing_weapons[0]->get_name(subtype);
      r += " (0/" + tostring(count_weapons()) + ")";
   }
   else r = "None";
   return r;
}

Finally, in weapon.cpp:
Code: [Select]
const string& Weapon::get_name(unsigned subtype) const
{return weapontype[getweapontype(itemtypename())]->get_name(subtype);}


When printing a liberal's stats, the game calls get_weapon_string(int subtype). The very first line of this calls is_armed(), which in turn calls get_weapon(). If the liberal is genuinely unarmed, get_weapon() returns weapon_none() which causes is_armed() to return false. As a result, get_weapon_string(int subtype) returns the string "None" without actually fiddling with the character's nonexistent weapon.

However, if the liberal possesses SKILL_MAGIC, get_weapon() returns weapon_magic() to is_armed(), causing the if statement in get_weapon_string() to then call Weapon::get_name(). However, the magic weapon of the creature doesn't actually exist, and since Weapon::get_name() does not know to call weapon_magic() to get the static constant weapon that it needs. As a result, itemtypename() in Weapon::get_name(unsigned subtype) returns an invalid string id.

Hence, segmentation fault.

The solution it seems to me then is to rewrite Creature::get_weapon_string(int subtype) so that it knows to go and get weapon_magic() (or weapon_powers() or weapon_suit()) before proceeding to call Weapon::get_name().

Does this sound right?

546
Curses / Re: Mod Planning: Terra Vitae mod
« on: September 19, 2014, 08:39:57 am »
It's okay - I'm figuring out what most of the characters are, anyhow (actually it seems to work in-game; it's the compiler that's flipping out and sending warning messages).

More importantly, where are the full names of weapons interpreted from XML? I've tested and discovered that it does not appear to be in WeaponType::WeaponType(MCD_STR xmlstring), since putting addstr() commands into that after every input does not pick up the full names (only the short names).


547
Curses / Re: LCS 4.07.0 Download (Sneak Attacks, April 2013)
« on: September 18, 2014, 08:54:06 pm »
Just pointing out: music does not apparently work on the Mac version.

548
Curses / Re: Mod Planning: Terra Vitae mod
« on: September 18, 2014, 07:09:09 pm »
Okay, first, the good news: it compiles.

Next, I'm getting some weird characters in the code. For example, the minus sign dash is replaced with ƒ, and several other characters have been changed. For example, what is MayagÅez, Puerto Rico? Is it Mayaguez? :p


More to the point: the code in lines 396 through 403 of sitedisplay.cpp has six illegal characters that I can't easily figure out what they're supposed to be. Could you tell me what they are so that I can fix them?


Edit: Well, the problem is not the length of the strings in weapons.xml.

Edit to edit: I discover that when reading weapons in xml, WeaponType::WeaponType(MCD_STR xmlstring) only reads in the short name and future short name of each weapon. This includes both the Terra Vitae weapons (magic, blasters, powers), and the existing LCS weapons. However as I have now tested, I also note that the game displays these names correctly; I am guessing that it is somehow not correctly reading the long names of these weapons. Where can I find the function that reads these?

549
Curses / Re: Mod Planning: Terra Vitae mod
« on: September 18, 2014, 05:10:18 pm »
Okay, SVN LCS installs. I gotta run now, and I'll try to install your code (and upload it) later tonight! Thanks again! :)

550
Curses / Re: Mod Planning: Terra Vitae mod
« on: September 18, 2014, 04:58:02 pm »
I am completely hosed.

configure.ac generates the following error:
Code: [Select]
./configure.ac: line 4: syntax error near unexpected token `2.6'
./configure.ac: line 4: `AC_PREREQ(2.6)'

And bootstrap generates this error:
Code: [Select]
./bootstrap: line 2: autoreconf: command not found

I am also finding myself unable to install LCS from the SVN trunc, for the same error in bootstrap. I am trying to unpack the tarball of autoreconf from Sourceforge, and it seems to have hung up tar. I'm beginning to think that I need the help of a Unix weenie to do anything, now...

551
Curses / Re: Mod Planning: Terra Vitae mod
« on: September 18, 2014, 04:39:40 pm »
Uck - I don't know what is going on. According to the read me:

Quote
To get SVN:
  Install XCode via the App Store
  Open XCode, then go to the Downloads tab of the preferences menu
  Click the 'install' button next to "Command Line Tools"
To get autoconf: (in terminal):
  ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
  brew install automake
To build LCS:
  svn co http://svn.code.sf.net/p/lcsgame/code/trunk lcsgame
  cd lcsgame/
  ./bootstrap
  LIBS="/usr/lib/libiconv.2.dylib" ./configure
  make
To play:
  src/crimesquad

the line 'ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"' gets the error message "curl: (22) The requested URL returned error: 400 Bad Request"...

552
Curses / Re: Mod Planning: Terra Vitae mod
« on: September 18, 2014, 04:33:52 pm »
Well, the first method deleted every line of text from every text file in the directory! I'm downloading the code you wrote again and am going to try #3... :)

553
Curses / Re: Turning yourself in? (4.07.4 beta)
« on: September 18, 2014, 09:22:55 am »
If the conservatives are alarmed, and the first person in the enemy squad is a cop, then one of your options is surrender/give up.

Although, with 88 counts of treason, there's not much you can do no matter how good your sleeper lawyer is and have a sleeper judge.

Publishing Secret Documents or the Intelligence HQ Data Disk is treason, as is hacking the CIA mainframe.

554
Curses / Re: Mod Planning: Terra Vitae mod
« on: September 18, 2014, 06:39:54 am »
Ugh - Configure isn't working either (command not found). I'm doing this in the parent directory that contains all of the files, not the src directory. Typing configure.ac gets the following error:

Code: [Select]
: command not founde 3:
./configure.ac: line 4: syntax error near unexpected token `2.6'
'/configure.ac: line 4: `AC_PREREQ(2.6)


Following the full directions, 'chmod 744 bootstrap' appears to have worked, but './bootstrap' also gives a command not found message (and everything downstream of that also doesn't work).


EDIT: Would downloading and reinstalling the original LCS source using SVN, then copying over and replacing the modified files (makefile.am, weapons.xml, armors.xml, and everything in the /src directory) work? If so I'll do that after my current RL job this morning is over.

555
Curses / Re: Mod Planning: Terra Vitae mod
« on: September 17, 2014, 06:50:58 pm »
Version 0.12 is released, courtesy of Liberal Elitist! (updated link on the opening post)

It's the version that Liberal Elitist has been so diligently working on (thank you very much!). I'm going to try to get the new weapon segfault fixed as soon as possible so that I can release version 0.2, but if I can't get that done in a few days, I'll upload version 0.13 which will have the "what if your recruit is married?" that is written but needs to be added to the new code.

Now that it's up on DFFD, we shouldn't have to worry about sendspace.com's 30-day limit. :)


*

I notice that you changed the order of the weapons in the xml file, so I'm guessing that the id numbers in the array will be different.

Unfortunately, I do not have a debugger. I can't install ddd on my new machine for some reason that I cannot understand. All of the debugging that I've been doing so far has been through the use of fprintf statements to stderr. But I will try to find out what the new id numbers are of the different weapons and see if they get loaded correctly. I'll also fiddle with the lengths of the strings and see if that could be a simple solution.


Edit: It occurs to me - Magic, Powers, and Blasters are the only ranged weapons in the game that do not use ammo. Could this be causing it somehow?

Edit to edit: Crap! I can't compile your code! I type 'make' and get the following error message: No targets specified and no makefile found.  Stop.

Edit to edit to edit: I notice your download has no makefile. Would the 0.11 makefile work if copied over?

Pages: 1 ... 35 36 [37] 38 39 ... 46