Customization of gamedata files

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • tangar
    replied
    It would be great to add 'simple' condition's system to gamedata customization. It would be give wide possibilities, eg to make different races to react differently at stuff.

    It could be called: flagcheck

    Example of impementation: in PWMA we have corpses of monster. Why not to give possibility to eat them (hello, Nethack!). But different races should have different effects on eating corpses. We can't let elf to eat orc's corpses without consequences So, eg:

    Code:
    name:corpse (orcish)
    graphics:%:w
    type:corpse
    properties:0:100:0
    combat:0:1d1:0:0:0
    [B]flagcheck[/B]:race: ELF | HIGH-ELF # works at elves
    effect:SET_NOURISH # this would happen to all elves
    dice:$B
    expr:B:FOOD_FAINT:- 1
    random: # this is random event which could happen in addition
    effect:TIMED_INC:CONFUSED
    dice:20d40
    effect:DRAIN_STAT:WIS
    dice:1
    [B]flagcheck[/B]:race: HALF-ELF # half-elf is better in eating orcs ^^
    effect:SET_NOURISH
    dice: 1000 # as we don't have hunger as timed status effect yet, lets just take weak status ;)
    [B]flagcheck[/B]:race:except: ELF | HIGH-ELF | HALF-ELF  # next effects would work at everyone else.. donno how to implement better ('except'?)
    effect:NOURISH
    dice:1000
    desc:Whatever happened with this one, it wasn't pretty.
    It would bring customization to the new lvl
    Last edited by tangar; February 2, 2019, 16:40.

    Leave a comment:


  • tangar
    replied
    It seems it works this way (thanks to Powerwyrm for help):

    Code:
    spell:Detect Monsters:1:1:23:4
    effect:DETECT_VISIBLE_MONSTERS
    dice:11d2
    dice is radius. For x and for y; so:

    11 tiles horizontally
    2 tiles vertically

    so 10d10 would be LOS

    /rfe
    maybe it should be not 'd', but 'r' (radius).. Like 11r3

    cause right now it's very messy with RPG dice notation

    Leave a comment:


  • tangar
    replied
    /bug (?)

    1) it seems 'dice:n+4d2' doesn't work (and dice:4d2+10 would crush the game)

    I've tried several tests:

    dice:10+4d2
    dice:50+4d2
    etc

    eg

    Code:
    spell:Detect Monsters:1:1:23:4
    effect:DETECT_VISIBLE_MONSTERS
    dice:10+4d2
    desc:Detects all non-invisible monsters in the immediate area,
    desc:for one turn only
    it works as 4d2, not as 10+4d2

    2) when I make spell:

    dice:11d2 - it works at distance ~4, not 11-22

    dice:8d2 - works as... 8. not 8-16
    8d3 also works as 8
    Last edited by tangar; February 1, 2019, 11:47.

    Leave a comment:


  • takkaria
    replied
    Originally posted by Nick
    That's worth thinking about. What do others think?
    I think it would be a mistake to have both systems in place. Having it in object.txt is quite elegant. But it depends who you're optimising for - existing tileset maintainers or new tileset producers. If the latter, you want tilesets as modular as you can get them; if the former, you want everything in one place.

    Leave a comment:


  • Nick
    replied
    Originally posted by tangar
    What about to give a possibility to assign an object to tileset 'quick&dirty' way (actually it nice and clean.. ), right in gamedata file? eg:



    where:
    tile:[number of tileset]:[x]:[y] , so in eg above 'tile:3' is Gervais tileset; 'tile: 4' - Nomad.

    and make it override tileset .prf files. Such addition would make adding and assigning new object to tileset very pleasant and easy

    Right now to add or reassign object you need to edit 5 different .prf files with the same name.. It's hell mess. Even if it's only 1 tileset to modify - having everything in one file is so great DD
    That's worth thinking about. What do others think?

    Leave a comment:


  • tangar
    replied
    What about to give a possibility to assign an object to tileset 'quick&dirty' way (actually it nice and clean.. ), right in gamedata file? eg:

    name:& Lantern~
    type:light
    graphics:~:U
    properties:3:50:35
    alloc:70:5 to 100
    combat:0:1d1:0:0:0
    flags:TAKES_FUEL | EASY_KNOW | LIGHT_2 | IGNORE_FIRE
    tile:3:0x87:0x99
    tile:4:0x89:0x81
    where:
    tile:[number of tileset]:[x]:[y] , so in eg above 'tile:3' is Gervais tileset; 'tile: 4' - Nomad.

    and make it override tileset .prf files. Such addition would make adding and assigning new object to tileset very pleasant and easy

    Right now to add or reassign object you need to edit 5 different .prf files with the same name.. It's hell mess. Even if it's only 1 tileset to modify - having everything in one file is so great DD

    Leave a comment:


  • tangar
    replied
    Yayyy! Thank you It's alright for now

    *rubs his hands in anticipation* Time to poison some food.. poor things...

    Leave a comment:


  • takkaria
    replied
    It's not pleasant but the following would give you a 1/4 chance of poison:

    Code:
    effect:RANDOM
    effect:NOURISH
    dice:6000
    effect:NOURISH
    dice:6000
    effect:NOURISH
    dice:6000
    effect:TIMED_INC:POISONED

    Leave a comment:


  • tangar
    replied
    /rfe
    add possibility to assign certain chance for an item to produce certain effects. EX:
    - assign ..% chance that food ration would be rotten (or poisoned ) and would make player sick for a while.

    Something like
    random:[chance]:[effect type]:[effect]...
    eg:

    name:& Ration~ of Food
    graphics:,:U
    type:food
    properties:0:8:3
    alloc:40:0 to 50
    pile:100:1d5
    effect:NOURISH
    dice:6000
    random:1:TIMED_INC:POISONED
    msg_self:That tastes good.
    desc:This nutritious but fairly bland food is familiar to anyone contemplating
    desc: long journeys.

    --

    Actually my dream to have 'proper' rotten rations, but I suppose it's too hard to implement such behaviour.. So they would be the same as normal rations (kinda 'mimic'-items), and you would understand that they are bad only after you would eat them. But I suppose it's too hard to implement such behaviour, cause rotten and common items won't stack in a pile. What do you think?
    Last edited by tangar; January 30, 2019, 19:11.

    Leave a comment:


  • tangar
    replied
    Great!

    I wanna add 'curses' which induce hunger; like inverse 'slow digestion', but it seems there is no way to implement it without modifying the code; so it would be splendid to have customization in this field!

    Leave a comment:


  • Nick
    replied
    Originally posted by Derakon
    Note that this will have the odd behavior of "filling you up" to Hungry if you trigger the trap when Weak.

    I guess the ideal would be to subtract some amount from the player's hunger counter, but I'm not familiar enough with how these effect specifications work to know if that's possible.
    Probably the correct thing to do, in fact, is to set hunger as another player timed status effect - this should work fine now there is no gorged status.

    Filing that now.

    Leave a comment:


  • Derakon
    replied
    Note that this will have the odd behavior of "filling you up" to Hungry if you trigger the trap when Weak.

    I guess the ideal would be to subtract some amount from the player's hunger counter, but I'm not familiar enough with how these effect specifications work to know if that's possible.

    Leave a comment:


  • tangar
    replied
    YAY! Takkaria, thank you very much!! DD

    Leave a comment:


  • takkaria
    replied
    You can just use the number with SET_NOURISH, e.g.

    Code:
    effect:SET_NOURISH
    dice:1999
    is 1 hunger step into 'Hungry'.

    Leave a comment:


  • tangar
    replied
    Today this silly newbie (I am) tried to customized the hunger state from traps.. To create my own trap.

    # hunger

    name:trap:hunger trap
    graphics:^:light yellow
    appear:1:10:0
    visibility:d50
    flags:TRAP | FLOOR | MAGICAL | ONETIME
    effect:SET_NOURISH
    dice:$B
    expr:B:FOOD_FAINT:- 1
    desc:A trap that makes you very hungry.
    msg:You feel yourself very hungry!
    But. I wanna make trap less severe. I've looked with my wide blank eye @ source code and found some staff

    player-common.h
    #define PY_FOOD_MAX 17000 /* Food value (Bloated) */
    #define PY_FOOD_FULL 10000 /* Food value (Normal) */
    #define PY_FOOD_ALERT 2000 /* Food value (Hungry) */
    #define PY_FOOD_WEAK 1000 /* Food value (Weak) */
    #define PY_FOOD_FAINT 500 /* Food value (Fainting) */
    #define PY_FOOD_STARVE 100 /* Food value (Starving) */
    player-timed.c
    if (v < PY_FOOD_FAINT) new_aux = 0;
    else if (v < PY_FOOD_WEAK) new_aux = 1;
    else if (v < PY_FOOD_ALERT) new_aux = 2;
    else if (v < PY_FOOD_FULL) new_aux = 3;
    else new_aux = 4;
    Then I've started experimentation with trap effect..

    effect:SET_NOURISH
    dice:$B
    expr:B:FOOD_FAINT:- 1

    I've tried loads of different effects like:
    expr:B:FOOD_WEAK:- 1
    expr:B:FOOD_ALERT:- 1
    ...
    even to exotic ones (good example when you do something which you have no clue):
    expr:B:FOOD_FAINT:+ 1

    ..

    Then I recognized that this could be a boolean

    Damm. Then I've tried to use:

    effect:NOURISH

    with '-' value.. like:
    effect:NOURISH
    dice:-4000

    it didn't work.

    /rfe
    Would be fun to have some customization on hunger state
    . At the same time maybe someone could advice me certain trick, maybe it's possible to do it in current version?

    Thanks!
    Last edited by tangar; January 29, 2019, 09:50.

    Leave a comment:

Working...
😀
😂
🥰
😘
🤢
😎
😞
😡
👍
👎