Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old February 6, 2019, 20:15   #51
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,928
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by tangar View Post
Next question (or /rfe) is about DoT (damage per time) type of damage. I wonder, is it possible to assign such effect to monsters and player attacks or to the objects? So it would work like 'poison', but would be different type, eg give possibility to add 'burning' or damaging curse effect?
That is a bit outside the realm of what can be done in the gamedata files, I'm afraid.
__________________
takkaria whispers something about options. -more-
takkaria is offline   Reply With Quote
Old February 7, 2019, 05:32   #52
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,703
Donated: $60
Nick is on a distinguished road
I thought a brief history of the data files might be helpful here. I'll describe four stages, focusing on wands:
  1. 2.4.fk - in the beginning, there was a single .c file that handled wands, wands.c, calling it's effects from spells.c. Everything hard-coded, no mucking about.
  2. 2.8.3 - now we have a text file containing all the objects, k_info.txt, but it's not really very readable. In particular, note the "I" line, for example
    Code:
    I:65:18:0
    for wands of fire bolts. The 65 meant it was a wand, and the 18 meant fire bolts; the game looked these up in a big master list, defines.h, and then used the values as an index when it was producing the effect in the file which dealt with item use, cmd6.c.
  3. 3.2.0 - the text file, object.txt, is getting more readable. It still has a lot of coded fields, but they are explained at the top of the file, and our wand of fire bolts now has a line
    Code:
    E:FIRE_BOLT2
    to indicate that it uses the effect FIRE_BOLT2. The way the game does that is to look up that effect in effects.c, which codes that particular effect. Note that effects.c also has FIRE_BOLT, FIRE_BOLT3 and FIRE_BOLT72, which produce fire bolts for a rod or a spell or an activation, but with different parameters.
  4. current master - now object.txt has the lines
    Code:
    effect:BOLT_OR_BEAM:FIRE
    dice:12d8
    which tell the game to produce a bolt (or beam), make it of fire, and give it power 12d8. The bolt effect is in effects.c, but now in a function which takes its parameters from the object.txt file, rather than being hard-coded.

So gradually more and more data has made its way from being hard-coded in .c and .h files to being in the user-editable-without-recompiling data files. Which is best is a matter of opinion.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old February 7, 2019, 08:16   #53
tangar
Knight
 
tangar's Avatar
 
Join Date: Mar 2015
Location: Moscow, Russia
Posts: 522
tangar is on a distinguished road
My previous message was posted just a few seconds before Takkaria's answer, so it could be lost; so I'll post it there with some addition info


/rfe add:
Code:
effect:TIMED_INC:DRAIN_STAT:<STAT>
dice:XdX  # value of debuff
time:X     # there is 'time' already for recharging.. this particular time means for how much turns effect would be applied
eg:
Code:
effect:TIMED_INC:DRAIN_STAT:WIS
dice:5d2
time:15
background:
With this effect it would be possible to implement interesting short-term effects. Right now in most cases we should use small values of debuffs cause they all are permanent (btw it's great that lvlup cures this, great mechanics). Eg it could be interested to lower character strength -10 in certain situation for a few turns.

And it's not only such 'powerful' effects like -10... Also it could be used to add some moderate stuff to make some objects more 'spicy'; eg I've made booze to have a lot of different random effects.. Among them there are effect: DRAIN_STAT: .. It would be great to have possibility to make this as temp effect - hangover hehe
__________________
http://tangaria.com - persistent online multiplayer roguelike game
tangar.info - my website ⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽ My chars @ angband.oook.cz
youtube.com/GlazGame — streams in English ⍽ youtube.com/StreamGuild — streams in Russian

Last edited by tangar; February 7, 2019 at 08:31.
tangar is offline   Reply With Quote
Old February 7, 2019, 08:26   #54
fph
Knight
 
Join Date: Apr 2009
Location: Berlin / Italy
Posts: 759
fph is on a distinguished road
Angband messages, as they work now, look like a nightmare for translation. Languages like German or Russian have cases, so in sentences like "the orc hits you", "you hit the orc", "you throw an arrow at the orc" the word "orc" needs to be translated in three different ways, and these should be stored separately for each monster since they may behave irregularly. So instead of singular/plural you have to store in the gamedata six or more versions of each monster name (and possibly handle other exceptions). As well as its grammatical gender, since that may affect other random bits of the sentence. Not even gettext is equipped to handle this, as far as I know (it can only switch singular/plural based on a variable number, basically).

You essentially need a full-blown DSL just for that (and the project Takkaria suggested seems to be one, essentially).
__________________
Dive fast, die young, leave a high-CHA corpse.
--
You read a scroll labeled 'lol gtfo' of Teleport Level.
fph is offline   Reply With Quote
Old February 7, 2019, 12:36   #55
t4nk
Swordsman
 
Join Date: May 2016
Posts: 330
t4nk is on a distinguished road
So calling someone an idiot via PM is "harrassing", but incredibly scummy and insulting posts like this are tolerated? Wow, that's pretty lowly. I thought better about the moderator.
Since the moderation policy of this forum doesn't suit me at all, I'm out of here.
t4nk is offline   Reply With Quote
Old February 7, 2019, 21:47   #56
tangar
Knight
 
tangar's Avatar
 
Join Date: Mar 2015
Location: Moscow, Russia
Posts: 522
tangar is on a distinguished road
Quote:
Originally Posted by t4nk View Post
So calling someone an idiot via PM is "harrassing", but incredibly scummy and insulting posts like this are tolerated? Wow, that's pretty lowly. I thought better about the moderator.
Since the moderation policy of this forum doesn't suit me at all, I'm out of here.
Moderators asked me not to reply to your posts, but I'll just note for the last time..

I didn't said anything bad directly towards you, except 'toxic' word - after you repeated offence via PM. I'm sorry for it.

Also I'm sorry if I hurt your feelings with my video, but I'm Russian-speaking too and I do not see anything scummy and insulting in video which I posted. It's just my point of view, impersonal toward anyone at this forum, as I've recorded that video long time ago (2015), long time before this nasty situation.

As I said before in this topic:

Quote:
Originally Posted by tangar View Post
Let's just leave this tiny unpleasantness behind and do not repeat it again.
So I suggest just to ignore each other - I won't reply to your posts ever; if you would do the same to me - we could both to have comfortable communication within this forum.

Kind regards,
Tangar
__________________
http://tangaria.com - persistent online multiplayer roguelike game
tangar.info - my website ⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽ My chars @ angband.oook.cz
youtube.com/GlazGame — streams in English ⍽ youtube.com/StreamGuild — streams in Russian

Last edited by tangar; February 7, 2019 at 21:55.
tangar is offline   Reply With Quote
Old February 7, 2019, 22:20   #57
tangar
Knight
 
tangar's Avatar
 
Join Date: Mar 2015
Location: Moscow, Russia
Posts: 522
tangar is on a distinguished road
Return back to this idea:

Quote:
Originally Posted by tangar View Post
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
Quote:
Originally Posted by takkaria View Post
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.
This is very good question: maintainers or producers?

So it depends on how often do you change stuff. If you do it from time to time - it's ok to have stuff in nice separate folders. But for daily work when you juggle tiles now and then - editing .prf files is hell. Could it be 'conditional' stuff? I mean - lets .prf files stay as they are, but if user defined particular tile in gamedata file - let's it override .prf file.

But actually after Takkaria's post, I'm not sure that it was so good idea.. Another problem is that config files would become bigger, so it would be a bit harder to work with them - less space visible on the screen.. It could look like tiny problem at first, but who know what else would be added to config files in future, so maybe it's good to have each entry as 'short' as it could be, while it's possible.
__________________
http://tangaria.com - persistent online multiplayer roguelike game
tangar.info - my website ⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽ My chars @ angband.oook.cz
youtube.com/GlazGame — streams in English ⍽ youtube.com/StreamGuild — streams in Russian
tangar is offline   Reply With Quote
Old February 11, 2019, 09:29   #58
tangar
Knight
 
tangar's Avatar
 
Join Date: Mar 2015
Location: Moscow, Russia
Posts: 522
tangar is on a distinguished road
Angband’s objects customization

Just a tiny example of customization which is already possible within current system:

Code:
name:& Flask~ of Whisky
graphics:,:y
type:food
properties:0:5:100
alloc:40:0 to 50
effect:NOURISH
dice:500
effect:TIMED_INC:CONFUSED
dice:8+1d8
effect:TIMED_INC:BOLD
dice:30+1d20
effect:RESTORE_STAT:CON
effect:RESTORE_STAT:STR
effect:DRAIN_STAT:INT
dice:1
effect:DRAIN_STAT:WIS
dice:1
effect:RANDOM
dice:2
effect:TIMED_INC_NO_RES:PARALYZED
dice:11+1d8
effect:TIMED_INC:BLIND
dice:11+1d8
effect:TIMED_INC:IMAGE
dice:11+1d8
effect:TIMED_INC:AMNESIA
dice:11+1d8
effect:TIMED_INC:POISONED
dice:8+1d8
effect:TIMED_INC:SLOW
dice:11+1d11
effect:RANDOM
dice:6
msg_self:*Hic*.. *Hic*....
desc:It's pretty strong and could raise your spirits.
This is just a laugh, a small test for Angband Online, but it's already makes some interesting changes:

1) drinking Whisky restore STR/CON (important for newbie players who attacked wrong monster in melee and have -5 speed for example and can't continue playing), but could make you stupid OR less wise (logical lol).
2) it makes you bold (@ Angband Online it's pretty useful, eg to fight VS Maggot who is living at -50 and could 'fear' you sometimes)
3) it makes you confused (you drunk lol)
4) it produce certain random effects (drinking booze in magical world should be more interesting than in real life)
5) it nourishing.. and in Angband Online it's very important as you can not buy food in the shops. Whiskey also could found only during adventures.

Why I posting this? Just to show that working toward enhancing customization is important. So having:

Quote:
Originally Posted by tangar View Post
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
....
Would really open 'third' eye in Angband development.

Quote:
Originally Posted by takkaria View Post
At some point, if you start adding checks to gamedata files, you end up with a (hard to understand and nonstandard) scripting language...
The question is:

What is easier: to hardcode new objects' properties or to add them in object.txt ?

For example:

You have 50 objects, something like this tiny Whiskey flask, which you wish to customize with some 'checks'. What would you prefer - to hardcode it or to have them all in one place in object.txt?

And what about adding 51 object? 52? 153?

Having objects customization in one place - it's how it should be to move forward. Forward towards roguelike way - which is different from modern graphic RPGs with faceroll 3-buttons gameplay.

Why Angband implement new objects very rare? Answer is simple - because there are low possibility of such items customization. Monsters - ok, work is going on. Classes too. Their gamedesign potential are very high already and Angband using it's 5% (or even less), so there are loads of space left for their development. Monsters and classes got loads of properties and very high 'degree of freedom' as monsters are controlled by AI and classes are enhanced by players bahaviour.

But for objects, which got the only way to act - when you use them - there are lack of options. Enhancing this particular direction would bring game to the next level.
__________________
http://tangaria.com - persistent online multiplayer roguelike game
tangar.info - my website ⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽ My chars @ angband.oook.cz
youtube.com/GlazGame — streams in English ⍽ youtube.com/StreamGuild — streams in Russian

Last edited by tangar; February 11, 2019 at 09:35.
tangar is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
RST help files fph Development 13 September 6, 2011 20:08
Pref files relic Vanilla 11 August 9, 2011 20:40
Updating help files fizzix Vanilla 23 August 3, 2010 04:19
delete.me files konijn_ Development 2 December 8, 2009 22:43
edit files? tummychow Vanilla 2 September 13, 2009 20:38


All times are GMT +1. The time now is 19:47.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.