Author Topic: LambdaHack  (Read 43715 times)

Man of Letters

  • Rogueliker
  • ***
  • Posts: 68
  • Karma: +0/-0
    • View Profile
    • Email
Re: LambdaHack
« Reply #30 on: September 01, 2014, 10:57:40 PM »
Actually, I just checked that the only factions in Allure of the Stars that have leaders are heroes and aliens. So I don't even need to modify animals and robots in any way to make sure that aliens don't start spawning until heroes get to the first alien-spawning level.

BTW,  tuturto, could you give the i386 binary a try? See http://forums.roguetemple.com/index.php?topic=3633.msg39382#msg39382. I'm getting closer and closer to Windows binaries, but I've got tired with these hacks recently (plus I try to document this on the Haskell wiki and open tickets as I go, which takes time).

tuturto

  • Rogueliker
  • ***
  • Posts: 259
  • Karma: +0/-0
    • View Profile
    • pyherc
Re: LambdaHack
« Reply #31 on: September 02, 2014, 08:27:51 AM »
Quote from: Mikon
Oh, I'm glad. I'm a perfectionist, so I detest my heroes making non-optimal moves and getting into each other's way. But I guess many people find it fun and strongly prefer faster play, just as you do. So, Space Privateers may become a hit much easier than Allure of the Stars, at least unless I add mouse selection and other tweaks to make manual moving of groups of heroes easier. Or perhaps you'll specialize in large battles and general mayhem and I'll have to focus Allure of the Stars on stealth, where every single move really matters.

True, with space privateers it's not that important that every move they make is perfect. They probably have had couple grogs before boarding the city vessel anyway ;) Which reminds me, that I should look into adding grog tankards into the game somehow. Maybe boost calmness and damage in melee, but decrease accuracy for a while.

Quote from: Mikon
This gives me an idea to do just that in Allure --- have only animals and robots until certain level and don't introduce aliens with any pre-spawned actor. If I tweak animals and robots to avoid exploring other levels, I can surprise the player by a sudden onset of aliens once he wakes them up (that is, makes them start spawning, by visiting a level where they spawn) and then they start exploring the whole dungeon and attacking en masse.

Actually, I just checked that the only factions in Allure of the Stars that have leaders are heroes and aliens. So I don't even need to modify animals and robots in any way to make sure that aliens don't start spawning until heroes get to the first alien-spawning level.

That sounds like a cool idea.

Quote from: Mikon
BTW,  tuturto, could you give the i386 binary a try? See http://forums.roguetemple.com/index.php?topic=3633.msg39382#msg39382. I'm getting closer and closer to Windows binaries, but I've got tired with these hacks recently (plus I try to document this on the Haskell wiki and open tickets as I go, which takes time).

I will do that in the evening and let you know how it turned out.
Everyone you will ever meet knows something you don't.
 - Bill Nye

CaptainKraft

  • 7DRL Reviewer
  • Rogueliker
  • *
  • Posts: 60
  • Karma: +0/-0
    • View Profile
Re: LambdaHack
« Reply #32 on: September 02, 2014, 03:58:19 PM »
It's very tempting to fire up some old Haskell code that I worked on. I never did get into any game programming with the language but I did enjoy learning about it and functional programming in general. Unfortunately I have to focus on class and my other game projects at the moment, but I will definitely be lurking around here to see what everyone can do with the language.

This framework looks like a great start for people getting into Haskell. Keep it up doods!
Build a man a fire, and he'll be warm for a day.
Set a man on fire, and he'll be warm for the rest of his life.

Man of Letters

  • Rogueliker
  • ***
  • Posts: 68
  • Karma: +0/-0
    • View Profile
    • Email
Re: LambdaHack
« Reply #33 on: September 03, 2014, 08:19:47 AM »
CaptainKraft, good luck with you other projects, but don't resist the Call of Haskell for too long. ;)

tuturto, thank you very much for checking out the i386 binaries.

Quote
They probably have had couple grogs before boarding the city vessel anyway ;) Which reminds me, that I should look into adding grog tankards into the game somehow.

What an oversight! ;) That can easily lead to mutiny and we don't yet have code for that (well, unless leader change is the code).

Quote
Maybe boost calmness and damage in melee, but decrease accuracy for a while.

Sounds resasonable, but unfortunately we don't yet have timed effects. This will be the main focus of post-v0.5 work,
probably involving FRP (functional reactive programming), because I want to (over)do this properly.
The best you can do for now is probably RefillCalm, Impress, a small PushActor, perhaps Paralyze/DropBestWeapon in you are nasty.

BTW, I've implemented and pushed the waking-up of aliens in Allure of the Stars. Thanks for the idea!

I've had a closer look at skills and I see that my advice to remove AbTrigger from fskillsOther of your playerTechCult was wrong.
The faction has a leader and fskillsOther only affects non-leaders, so it doesn't solve the problem. So, instead, you need to add

Code: [Select]
               AddSkills $ EM.singleton AbTrigger (-1)

To each member of this faction (in ItemKindActor). This will affect the leader as well.

tuturto

  • Rogueliker
  • ***
  • Posts: 259
  • Karma: +0/-0
    • View Profile
    • pyherc
Re: LambdaHack
« Reply #34 on: September 04, 2014, 06:59:51 PM »
Crisis averted, grog has been added:
Code: [Select]
grog = ItemKind
  { isymbol  = '!'
  , iname    = "grog tankard"
  , ifreq    = [("useful", 100)]
  , iflavour = zipPlain [Brown]
  , icount   = 1
  , irarity  = [(1, 3), (10, 1)]
  , iverbHit = "splash"
  , iweight  = 50
  , iaspects = []
  , ieffects = [ RefillCalm 30, Paralyze (3 + d 5)]
  , ifeature = [ toVelocity 25
               , Applicable, Identified ]
  , idesc    = "A tankard full of disgusting looking liquid, probably containing at least one or more of the following: kerosene,
                propylene glycol, sulphuric acid, rum, acetone, scumm, axle grease and battery acid."
  , ikit     = []
  }
Originally it was also doing d2 points of damage (because, frankly, it's disgusting), but I decided not to have that in the end.

I've had a closer look at skills and I see that my advice to remove AbTrigger from fskillsOther of your playerTechCult was wrong.
The faction has a leader and fskillsOther only affects non-leaders, so it doesn't solve the problem. So, instead, you need to add

Code: [Select]
               AddSkills $ EM.singleton AbTrigger (-1)

To each member of this faction (in ItemKindActor). This will affect the leader as well.

I should have been able to spot that too, but I didn't think of it enough. I'll do the change to respective actors.
Everyone you will ever meet knows something you don't.
 - Bill Nye

Man of Letters

  • Rogueliker
  • ***
  • Posts: 68
  • Karma: +0/-0
    • View Profile
    • Email
Re: LambdaHack
« Reply #35 on: September 10, 2014, 10:06:40 AM »
tuturto, a nice video!

http://youtu.be/nv_iuqdhwDw

I've commented on it.

On another front, the Windows binaries I hacked via Wine seem to work. Seriously!
So, when you want to make a new release, let me know, I release
a new version of LH, you rebase and then I can easily generate
the Windows binaries for you.

tuturto

  • Rogueliker
  • ***
  • Posts: 259
  • Karma: +0/-0
    • View Profile
    • pyherc
Re: LambdaHack
« Reply #36 on: September 10, 2014, 06:48:55 PM »
Cool! What I read about cross-compiling Haskell, it didn't look particularly easy. Great that you got it working. I probably don't have enough new content yet to warrant a new release, but I'll keep that in mind. I would love to be able to show the game to my co-workers at work.
Everyone you will ever meet knows something you don't.
 - Bill Nye

Bear

  • Rogueliker
  • ***
  • Posts: 308
  • Karma: +0/-0
    • View Profile
Re: LambdaHack
« Reply #37 on: September 10, 2014, 11:40:25 PM »
Crisis averted, grog has been added:


After playing too much Dwarf Fortress, it is clear that "Sober" needs to be a status effect for dwarfs, and possibly pirates, conferring some minor disadvantages.  There might even be an intermediate state, "not drunk enough" then a fairly broad "normal" range where they are at full capabilities, with "too drunk" and "much too drunk" on the other side.

Man of Letters

  • Rogueliker
  • ***
  • Posts: 68
  • Karma: +0/-0
    • View Profile
    • Email
Re: LambdaHack
« Reply #38 on: September 10, 2014, 11:53:10 PM »
Quote
"Sober" needs to be a status effect for dwarfs, and possibly pirates, conferring some minor disadvantages.  There might even be an intermediate state, "not drunk enough" then a fairly broad "normal" range where they are at full capabilities, with "too drunk" and "much too drunk" on the other side.

That makes perfect sense. Engine-wise, we'd either need to wait for timed events and effects to let game developers add that counter from scratch, or we can use the already existing Calm counter, with some extra flavour messages to drive the point home. In the latter case, we'd turn off Calm regeneration for pirates and they'd depend on grog for that. Some balancing would be needed to make the lack of Calm not as crippling as it is now, perhaps again only for pirates or only in Space Privateers.

Waiting for a github ticket...

Bear

  • Rogueliker
  • ***
  • Posts: 308
  • Karma: +0/-0
    • View Profile
Re: LambdaHack
« Reply #39 on: September 11, 2014, 02:12:57 AM »
Hmm.  Perhaps sober means calm regeneration is only at 1/3 normal.  Then you could have a crew of 'sober' privateers able to hold things together, with some friction, or even achieve full calmness, under normal circumstances, but they'd fall apart in the presence of anything that takes their calm away too fast.

tuturto

  • Rogueliker
  • ***
  • Posts: 259
  • Karma: +0/-0
    • View Profile
    • pyherc
Re: LambdaHack
« Reply #40 on: September 11, 2014, 07:11:38 AM »
Hey, how did I miss that. Grog has slight boost for calm already, but somewhat more complete model would be neat.

Currently calm affects if character can access to shared cache or use potions. Mikon, was there anything else that it affects?

I think I would wait for timed effects and have a privateers who is somewhat drunk to have advantage in combat. Could even add more alcoholic beverages with slightly varying effects and alcohol content.
Everyone you will ever meet knows something you don't.
 - Bill Nye

Man of Letters

  • Rogueliker
  • ***
  • Posts: 68
  • Karma: +0/-0
    • View Profile
    • Email
Re: LambdaHack
« Reply #41 on: September 11, 2014, 07:44:22 AM »
Quote
I think I would wait for timed effects and have a privateers who is somewhat drunk to have advantage in combat. Could even add more alcoholic beverages with slightly varying effects and alcohol content.

That one slowly turns into a PEGI (ESRB) 21+ game. ;)

Quote
Currently calm affects if character can access to shared cache or use potions. Mikon, was there anything else that it affects?

Indeed, Calm below 2/3 of max inhibits any item manipulation involving the shared stash.
Also, summoning depends on and uses up Calm. Current Calm also bounds the sight radius.
And a nasty effect: at Calm 0, when an actor is impressed by enemies, he defects.

In the future there may be one or two more effects, but I think especially the last
one is grave enough, though not trivial to figure out in casual games. Perhaps I should
mention Calm in the message about the actor defecting. Anyway, it only happens in games
that have enough items (or organs) that impress enemies (or oneself).

tuturto

  • Rogueliker
  • ***
  • Posts: 259
  • Karma: +0/-0
    • View Profile
    • pyherc
Re: LambdaHack
« Reply #42 on: September 11, 2014, 06:56:02 PM »
Indeed, Calm below 2/3 of max inhibits any item manipulation involving the shared stash.
Also, summoning depends on and uses up Calm. Current Calm also bounds the sight radius.
And a nasty effect: at Calm 0, when an actor is impressed by enemies, he defects.

That last one is quite grave and good motivator keeping ones calm above 0. I wasn't aware of that or the sight radius cap. Thrown potions that lower calm just got really dangerous.
Everyone you will ever meet knows something you don't.
 - Bill Nye

tuturto

  • Rogueliker
  • ***
  • Posts: 259
  • Karma: +0/-0
    • View Profile
    • pyherc
Re: LambdaHack
« Reply #43 on: December 15, 2014, 07:47:42 AM »
A new version of LambdaHack has been released and I upgraded Space Privateers to use it. Getting the program to type check was pretty fast and straight forward, but I seem to be having a problem in my campaign settings. After starting the game, I get the error:

Quote
Internal failure occurred and the following is to blame:
  ("no unique group",(starting,fromList [(campaign,[(1,(Id 0,ModeKind {msymbol = 'a', mname = "campaign", mfreq = [(campaign,1)], mroster = Roster {rosterList = [Player {fname = "Space Privateers", fgroup = hero, fskillsOther = fromList [(move,1),(melee,1),(displace,-100),(alter tile,1),(wait,1),(manage items,-100),(fling,1),(activate,-100),(trigger tile,1)], fcanEscape = True, fneverEmpty = True, fhasNumbers = True, fhasGender = True, ftactic = follow leader's target or position, fentryLevel = - (1) - (0), finitialActors = 3, fleaderMode = LeaderUI (AutoLeader {autoDungeon = False, autoLevel = False}), fhasUI = True},Player {fname = "Merchant Mariners", fgroup = merchant, fskillsOther = fromList [(move,-100),(melee,1),(displace,-100),(alter tile,-100),(wait,1),(manage items,-100),(fling,-100),(activate,-100),(trigger tile,-100)], fcanEscape = False, fneverEmpty = False, fhasNumbers = False, fhasGender = True, ftactic = find and patrol an area (TODO), fentryLevel = - (1) - (0), finitialActors = 3, fleaderMode = LeaderAI (AutoLeader {autoDungeon = True, autoLevel = False}), fhasUI = False},Player {fname = "Forces of Chaos", fgroup = chaos, fskillsOther = fromList [(move,-100),(melee,1),(displace,-100),(alter tile,-100),(wait,1),(manage items,-100),(fling,1),(activate,-100),(trigger tile,-100)], fcanEscape = False, fneverEmpty = False, fhasNumbers = False, fhasGender = True, ftactic = explore unknown, chase targets, fentryLevel = - (1) - (0), finitialActors = 3, fleaderMode = LeaderAI (AutoLeader {autoDungeon = True, autoLevel = False}), fhasUI = False},Player {fname = "Tech Cult", fgroup = tech, fskillsOther = fromList [(move,1),(melee,1),(displace,-100),(alter tile,1),(wait,1),(manage items,-100),(fling,1),(activate,-100),(trigger tile,-100)], fcanEscape = False, fneverEmpty = True, fhasNumbers = False, fhasGender = False, ftactic = follow leader's target or position, fentryLevel = - (2) - (0), finitialActors = 4, fleaderMode = LeaderAI (AutoLeader {autoDungeon = True, autoLevel = False}), fhasUI = False},Player {fname = "Horrors of Warp", fgroup = horror, fskillsOther = fromList [(move,1),(melee,1),(displace,1),(alter tile,1),(wait,1),(manage items,1),(fling,1),(activate,1),(trigger tile,1)], fcanEscape = False, fneverEmpty = False, fhasNumbers = False, fhasGender = False, ftactic = find and patrol an area (TODO), fentryLevel = - (3) - (0), finitialActors = 0, fleaderMode = LeaderNull, fhasUI = False},Player {fname = "Spawns of Warp", fgroup = spawn, fskillsOther = fromList [(move,1),(melee,1),(displace,-100),(alter tile,1),(wait,1),(manage items,-100),(fling,-100),(activate,-100),(trigger tile,1)], fcanEscape = False, fneverEmpty = False, fhasNumbers = False, fhasGender = False, ftactic = roam freely, chase targets, fentryLevel = - (2) - (0), finitialActors = 3, fleaderMode = LeaderAI (AutoLeader {autoDungeon = True, autoLevel = False}), fhasUI = False}], rosterEnemy = [("Space Privateers","Merchant Mariners"),("Space Privateers","Forces of Chaos"),("Space Privateers","Spawns of Warp"),("Merchant Mariners","Forces of Chaos"),("Merchant Mariners","Spawns of Warp"),("Tech Cult","Forces of Chaos"),("Tech Cult","Spawns of Warp")], rosterAlly = [("Forces of Chaos","Spawns of Warp"),("Merchant Mariners","Tech Cult")]}, mcaves = fromList [(-10,(caveRogue,Nothing)),(-9,(campaign random,Nothing)),(-8,(campaign random,Nothing)),(-7,(campaign random,Nothing)),(-6,(campaign random,Nothing)),(-5,(campaign random,Nothing)),(-4,(campaign random,Nothing)),(-3,(caveRogue,Nothing)),(-2,(temple,Nothing)),(-1,(caveRogue,Just True))], mdesc = "Get ready to assault the city vessel and plunder some loot!"}))])]))
SpacePrivateers: Control.Exception.Assert.Sugar.failure

I tried comparing my ModeKind.hs and ModeKindPlayer.hs to those of LambdaHack, but couldn't spot if I have a problem there somewhere.  Now, it would be cool if someone (Mikon for example ;) could give some pointers where to continue solving this problem.

I pretty excited about the possibility to have working storm hammers and privateer grog, so this update is something I want to get working soon.
Everyone you will ever meet knows something you don't.
 - Bill Nye

TheCreator

  • Rogueliker
  • ***
  • Posts: 370
  • Karma: +0/-0
    • View Profile
    • Fame
    • Email
Re: LambdaHack
« Reply #44 on: December 15, 2014, 07:57:17 AM »
Does your code actually look like this? Creepy.
Fame (Untitled) - my game. Everything is a roguelike.