Bay 12 Games Forum

Please login or register.

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

Author Topic: LCS Programming Discussion Topic  (Read 10755 times)

Jonathan S. Fox

  • Bay Watcher
    • View Profile
    • http://www.jonathansfox.com/
Re: LCS Programming Discussion Topic
« Reply #15 on: October 03, 2012, 07:47:55 pm »

I've been working on organizing the fight logs. If I just used gamelog.nextMessage() after every message, it would be really disorganized. I decided to make it so that it makes a blank line between rounds.

Spoiler: example fight log (click to show/hide)

That looks fantastic.
Logged

dreadmullet

  • Bay Watcher
  • Inadequate Comedian
    • View Profile
Re: LCS Programming Discussion Topic
« Reply #16 on: October 03, 2012, 07:53:07 pm »

(Edit moved to new post) The purpose of nextMessage() was to leave an arbitrary amount of blank lines, right? It seems I'm bypassing that function by mostly calling newline(). But I would argue that any more than 2 blank lines is absurd.


That looks fantastic.

Thanks!
Logged

dreadmullet

  • Bay Watcher
  • Inadequate Comedian
    • View Profile
Re: LCS Programming Discussion Topic
« Reply #17 on: October 04, 2012, 02:05:08 am »

I finally got around to pushing my huge revision I've been holding off. Hopefully I didn't break anything too much.

Spoiler: changelog (click to show/hide)


Note to self: there's a log message for when you leave a site, but not when you enter a site. (I think because it's in a different file that hasn't had logging added to, yet.)
Logged

addictgamer

  • Bay Watcher
  • Penguin Developer
    • View Profile
    • Github
Re: LCS Programming Discussion Topic
« Reply #18 on: October 04, 2012, 03:20:11 am »

Note to self: there's a log message for when you leave a site, but not when you enter a site. (I think because it's in a different file that hasn't had logging added to, yet.)

It is in a different file, if I recall correctly. I think in daily/activities.cpp
I haven't had too much time to work on that file. Been plenty busy with college this last week <.< But I'll finish it...eventually...
Logged
I'm patiently waiting for the ability to mine and construct palaces in adventure mode.
Barony. A 3D, multiplayer roguelike I am developing.

KA101

  • Bay Watcher
    • View Profile
Re: LCS Programming Discussion Topic
« Reply #19 on: January 14, 2013, 08:28:51 pm »

Necroing to figure out the problem with metal-detector checkpoints: having a sleeper on-site doesn't let the squad bypass the detection, and may even obstruct the Disguise check for uniform-conforming weapons.  Quoting from the map-mod thread where I originally mentioned the problem:
Update: -BEEEP-  -BEEEP-  -BEEEP-

Unfortunately the Conservative metal detector insists on alarming no matter the situation: my test-character couldn't take his .44 Magnum (IIRC that's acceptable for security or police) through the front door of the nuke plant even in a Security, Police, or even Death Squad Uniform.  Death Squads are active at the moment.  Not sure if my having a Lab Tech sleeper on-site derails the disguise-check, but I'm thinking that might be the culprit.  It does cancel mentioning that the squad actually goes through the detector, which they might or might not depending on the site/badges.

This sounds weird. The intended behavior when you have a sleeper is that you flash badges and get waved in. If you see the badge flashing text, there shouldn't be any way you'd get the metal detector going off -- the same trigger that shows that text should also prevent the game from checking for weapons at all.

First test I can think of is to send the guy through with some other disqualifying issue (no weapon), such as no Disguise or perhaps sending in someone without the skill.  Guessing that either the ", metaldetect" in the weapons-check line somehow bypasses the "!autoadmit", or maybe the second-visit call under autoadmit somehow doesn't clear the metaldetect.

That said, I'm no cpp coder so I could well be completely mistaken, too.

Edit on reviewing the thread: For the record, I use WinXP and will be installing Win2k (!) on the old tower once I get it a working primary drive.  Old-stuff compatibility is good.

Further edit, after taking another look at mapspecials.cpp: when a bouncer-checkpoint autoadmits, it also selfdestructs so far as I can tell; the remaining Club Security sticks around but you can walk around the front door all you like.  When a security checkpoint autoadmits, it changes to a "secondvisit" encounter, which doesn't have a value for metal-detecting or not.  Is it possible that the second-visit somehow doesn't carry over the autoadmit, but does carry over the detector?
« Last Edit: January 15, 2013, 08:23:51 pm by KA101 »
Logged

Jonathan S. Fox

  • Bay Watcher
    • View Profile
    • http://www.jonathansfox.com/
Re: LCS Programming Discussion Topic
« Reply #20 on: January 16, 2013, 04:37:44 pm »

Further edit, after taking another look at mapspecials.cpp: when a bouncer-checkpoint autoadmits, it also selfdestructs so far as I can tell; the remaining Club Security sticks around but you can walk around the front door all you like.  When a security checkpoint autoadmits, it changes to a "secondvisit" encounter, which doesn't have a value for metal-detecting or not.  Is it possible that the second-visit somehow doesn't carry over the autoadmit, but does carry over the detector?

The "secondvisit" encounter just spawns a couple of security guards, they shouldn't frisk you or send you through the metal detector. Should be the same as the bouncer.
Logged

Pesi

  • Bay Watcher
    • View Profile
AA-Gun is but a bomb-magnet.
« Reply #21 on: January 16, 2013, 11:02:13 pm »

Since we're talking programming here, what's the deal with the AA-gun? As far as I can tell...

"You hear planes streak overhead!"
"The thunder of anti-aircraft fire drives them back!"
"The anti-aircraft gun takes a direct hit!"
"Nothing left but smoking wreckage..."


...all it does is keep the generator from being destroyed for one day (or however many it takes the military to launch another plane), it doesn't actually keep them from bombing the compound.
Logged

Neonivek

  • Bay Watcher
    • View Profile
Re: LCS Programming Discussion Topic
« Reply #22 on: January 16, 2013, 11:25:25 pm »

It is almost like holding out against the United states military is impossible or something when you are outmanned, outclassed, and outgunned.
Logged

KA101

  • Bay Watcher
    • View Profile
Re: LCS Programming Discussion Topic
« Reply #23 on: January 17, 2013, 07:06:27 pm »

Further edit, after taking another look at mapspecials.cpp: when a bouncer-checkpoint autoadmits, it also selfdestructs so far as I can tell; the remaining Club Security sticks around but you can walk around the front door all you like.  When a security checkpoint autoadmits, it changes to a "secondvisit" encounter, which doesn't have a value for metal-detecting or not.  Is it possible that the second-visit somehow doesn't carry over the autoadmit, but does carry over the detector?

The "secondvisit" encounter just spawns a couple of security guards, they shouldn't frisk you or send you through the metal detector. Should be the same as the bouncer.

OK, fair enough.  Hypothesizing based on the trunk-code, and from what I've seen so far.  Will probably experiment again over the weekend.

Experiment conducted: My tester (10 Charisma, 9 Disguise, Lab Coat, no weapon equipped) repeatedly tried to pass the metal-detector checkpoint, which had a locked door in front of it if picking the door matters.  Leaky Beaker the Lab Tech sleeper routinely met him there and helped him flash an ID badge.  Equally routinely, the metal detector (staffed by Elite Security, if that matters) sounded, the site Alarmed, and the door ahead went red/nonpickable.  After Bluffing the remaining guard, the checkpoint indeed completely disappeared and the tester could walk around those two squares as much as he liked without encountering another checkpoint.

Assessment: Autoadmit is firing but not bypassing the detector.  Detector seems to trigger on something other than the presence of a weapon (does Martial Arts skill count??).  Secondvisit isn't actually doing anything--the detector-checkpoint is, in fact, self-destructing as per bouncers.

Fox, I'm sorry for the suboptimal report :( but something's munged here and I'm willing to say that the 4.06.3 metal-detector is not ready for prime time.  Got the screencaps to prove it if you tell me how you want them. (I use NoScript so if there's a button in the message-composer interface, I don't know about it).  Let me know if you'd like me to run it without sleepers or have any other experimental requests.
« Last Edit: January 18, 2013, 11:40:58 pm by KA101 »
Logged

Jonathan S. Fox

  • Bay Watcher
    • View Profile
    • http://www.jonathansfox.com/
Re: LCS Programming Discussion Topic
« Reply #24 on: January 21, 2013, 08:10:06 pm »

Well, I've looked at the code for the metal detector, and nothing has jumped out at me as possibly allowing that behavior, so it's probably either something obvious that I'm blindly missing, or something really subtle. I just can't think of a logical explanation for why the metal detector would go off on an unarmed person after they get auto-admitted by a sleeper; the obvious typos that came to mind for me aren't present. What I really need to do is reproduce the behavior in a debugger and step through the code line by line to figure out why it's happening. Right now I'm chest-deep in working on a game based on LCS though, so I'm not in a good brainspace to really do serious debugging on LCS. I don't have a conclusion when I'll get to tracking that bug down, but it's something I'd like to have working rather than broken.
Logged

KA101

  • Bay Watcher
    • View Profile
Re: LCS Programming Discussion Topic
« Reply #25 on: January 22, 2013, 12:02:47 am »

Well, if it's related to LCS and not flash-based/free-to-play, you could probably persuade me to give it a shot when you're done.  Thanks for the heads-up; I'll ease back on this for now.
Logged

addictgamer

  • Bay Watcher
  • Penguin Developer
    • View Profile
    • Github
Re: LCS Programming Discussion Topic
« Reply #26 on: January 24, 2013, 10:28:29 pm »

Alright, I've finally finished adding logging to everything (mostly -- there are some places that I wasn't sure if that thing should be logged). Sorry that I didn't finish it back in October; The second half of the semester thought it was a good idea to brutally murder all my time until Christmas. I blame video games for further delaying the update until today.

Anyway, I played a dozen or so game sessions with logging but I was not able to fully playtest everything (of course). So if there are any problems, please yell at me. Hopefully I didn't break anything. The game seemed to be functioning normally in all my playtests.

Again, sorry for the huge delay. I blame school, video games, and the sheer amount of time needed to playtest this update.
Logged
I'm patiently waiting for the ability to mine and construct palaces in adventure mode.
Barony. A 3D, multiplayer roguelike I am developing.

Jonathan S. Fox

  • Bay Watcher
    • View Profile
    • http://www.jonathansfox.com/
Re: LCS Programming Discussion Topic
« Reply #27 on: January 24, 2013, 10:55:13 pm »

Awesome! Just built and tried the game with those changes!

My gamelog.txt:

Code: [Select]


---------- PROGRAM STARTED ----------


A NEW CONSERVATIVE ERA
The Year is 2009.
Conservative President Paul Florez ends his second term with approval
ratings in the high 70s, and is succeeded by hardcore Arch-Conservative
Chris Warman.

With Conservatives sweeping into power in the House of Representatives
and Senate, and a Conservative majority in the Supreme Court of the
United States, commentators are hailing it as the beginning of a new
Conservative era.

President Chris Warman has asked the new Congress to move quickly
to rubber stamp his radical Arch-Conservative agenda. The left seems
powerless to stop this imminent trampling of Liberal Sanity and Justice.

In this dark time, the Liberal Crime Squad is born...

The Liberal Crime Squad has arrived at American Bank Corp.

Tricia Kindale says, "Do you want to hear something disturbing?"
Prostitute responds, "What?"
Tricia Kindale says, "Over thirty innocent people have been executed over the past decade."
Prostitute responds, "Dear me! Is there anything we can do?"
After more discussion, Prostitute agrees to come by later tonight.


A bank teller is available.
Tricia Kindale slips the teller a note: I HAVE A GUN. CASH PLEASE.
The bank teller reads the note, nods calmly, and slips several bricks of cash into the squad's bag.


The Liberal Crime Squad has left American Bank Corp.


Meeting with Erika Birkin, Prostitute
Tricia Kindale explains their views on torture.
Tricia Kindale comes off as slightly insane.
This whole thing was a mistake. There won't be another meeting.

The Liberal Crime Squad has arrived at The Oubliette.

The Liberal Crime Squad has arrived at Fire Station.

Tricia Kindale says, "Do you want to hear something disturbing?"
Firefighter responds, "No." <turns away>


You try the door, but it is locked.
Tricia Kindale unlocks the door!


You try the door, but it is locked.
Tricia Kindale unlocks the door!


You find: Kitschy Trinket


You try the door, but it is locked.
Tricia Kindale unlocks the door!


Tricia Kindale acts natural.


The Liberal Crime Squad has left Fire Station.


The Liberal Crime Squad has arrived at Stevenson's Department Store.

The Liberal Crime Squad has arrived at Police Station.

You try the door, but it is locked.
Tricia Kindale unlocks the door!


You find: PDA


You find: Laptop


You find: Cellphone


Police Officer sees the Squad's Liberal Weapons and lets forth a piercing Conservative alarm cry!


You try the door, but it is locked.
Tricia Kindale shoots at Police Gang Unit with a AR-15!
Tricia Kindale hits the left leg.
Police Officer shoots at Tricia Kindale with a Shotgun!
Police Officer hits the right leg.
Police Gang Unit shoots at Tricia Kindale with a MP5 SMG!
Police Gang Unit hits the left leg, striking three times.
Police Officer shoots at Tricia Kindale with a 9mm Semiauto!
Police Officer hits the body.
Tricia Kindale gasps a last breath and soils the floor.
Nobody can carry Martyr Tricia Kindale.



Logged

addictgamer

  • Bay Watcher
  • Penguin Developer
    • View Profile
    • Github
Re: LCS Programming Discussion Topic
« Reply #28 on: January 24, 2013, 11:32:23 pm »

Excellent. I'm happy the code works for other people too.
Logged
I'm patiently waiting for the ability to mine and construct palaces in adventure mode.
Barony. A 3D, multiplayer roguelike I am developing.

Vherid

  • Bay Watcher
  • [CREATURE:SLARK]
    • View Profile
Re: LCS Programming Discussion Topic
« Reply #29 on: January 25, 2013, 01:18:13 am »

That certainly sounds pretty nifty
Pages: 1 [2] 3 4 5