Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12

Thread: add type proxy for skills

  1. #1
    Senior Member ckb's Avatar
    Join Date
    Mar 2006
    Posts
    954

    Default add type proxy for skills

    Currently there are proxy fields for skills including: libram, buff, combat, song, expression

    That is 5 things, but there are 10 skill types from classskills.txt:
    # Type can be:
    # 0 (Passive)
    # 1 (Noncombat item summon)
    # 2 (Noncombat healing)
    # 3 (Noncombat non-shruggable effect)
    # 4 (Noncombat shruggable effect)
    # 5 (Combat)
    # 6 (One-at-a-time Noncombat Song)
    # 7 (Combat/Noncombat healing)
    # 8 (Combat/Passive)
    # 9 (One-at-a-time Noncombat Expression)

    It would be nice to have access to all this info via proxy fields rather than having to read in all of classskills into a big map.

    See my related post here.

    Thanks,
    ckb

  2. #2

    Default

    I would consider that a useless feature without first changing the data file to use words (maybe a comma-separated list) instead of arbitrary numbers. Changing the data file handling to use a human-readable comma-separated list would be a bit of work.

    Your initial thread doesn't give any explanation about why this would be useful compared to the already-existing proxy fields.

  3. #3
    Senior Member ckb's Avatar
    Join Date
    Mar 2006
    Posts
    954

    Default

    I guess I don't know if this would be totally useful other than in this one case where I am working on a skills relay page and I think it might be nice to sort by type.
    The thing I that I find most irksome is that there are these two different locations for information, and they are in different formats, and they give slightly different details.

    the proxy field will tell me if it is a libram skill, but the classskills info will not.
    the classskills info will tell me if it is a One-at-a-time Noncombat Song, but the proxy field will not.

    I am not 100% sure I have run through all the scenarios where one will matter more or less than another, but I can think of at least one instance where it might be useful. In the meantime, I can just load classskills.txt into a big map, and perhaps we can use this thread as the start of a conversation on the subject of data formatting.


    ckb

  4. #4
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,625

    Default

    The thing I that I find most irksome is that there are these two different locations for information, and they are in different formats, and they give slightly different details
    Originally Posted by ckb View Post

    IIRC the dev team has taken one of three actions when it appears that data is spread across multiple files and the equivalent of a JOIN is required to make them easier to use. One has been to take no action because there is no strong case to do so. One has been to provide the equivalent of a VIEW (is that a facade pattern?) in Ash so that a scripter deals with an Ash function and not a collection of maps and files. One has been to refactor the data files so that the data is organized accord to use.

    Since I am working in a shop that lives by loose coupling and always favors a Java interface, my knee knee reaction is to hide the files and formats from the scripter behind some kind of Ash function.

    "irksome" - The "A word for 2014"? :-)
    Well, thank you.
    Originally Posted by Veracity View Post

  5. #5
    Developer
    Join Date
    Apr 2010
    Posts
    5,134

    Default

    I guess the tricky thing here is if you are already planning to create a useful skills relay page, which presumably will include information about what a skill does, or it wouldn't be very useful, then you'll already be having to add lots of information not in mafia. These categories sometimes change when the skills do not, so there probably isn't a great advantage in using them. If I were adding a sort for a relay script it'd be more like one for passive/combat/non-combat/both, another for attack/heal/buff/song/expression rather than a single set of types as Mafia uses internally.

    (eg, I may well add a once per combat category, and track these in an array or list in FightRequest rather than what we do now, which is tracking some of them. There are a lot more than there once were. It no longer matters for relay browser buttons, as I changed it to use the presence of the skill in the dropdown to determine if it were usable. But would be good to handle it more generally. )

  6. #6
    Senior Member ckb's Avatar
    Join Date
    Mar 2006
    Posts
    954

    Default

    I guess the tricky thing here is if you are already planning to create a useful skills relay page, which presumably will include information about what a skill does, or it wouldn't be very useful, then you'll already be having to add lots of information not in mafia.
    Originally Posted by Darzil View Post
    Actually, Mafia is already ripe with bountiful information about all kinds of stuff, so there is very little that needs to be added manually.

    skill id is know, class can be found from proxy .class (or by knowing the skill id and how the kills are organized), skill type is available per classskills.txt above, mp cost is from mp_cost(), and number of turns per cast is turns_per_cast(), the resultant effect from to_effect(), and the details about this effects are from the modifiers() functions, and the image for this effect is available via effect proxy .image.
    Any limits to casting are tracked by mafia, as are current availability of each skill.

    So really the only detail I am planning on using that is awkward is the skill type from classskills.txt Though I can get this via a file_to_map(), it would be prettier if there were another way to access this info.

    ckb

  7. #7
    Senior Member ckb's Avatar
    Join Date
    Mar 2006
    Posts
    954

    Default

    I am bumping this again as I find myself wanting to know skill type in a script (This for mood balancing).
    The key is to not try to define a mood with multiple One-at-a-time Noncombat Songs or multiple One-at-a-time Noncombat Expressions.

    An ash function of
    int skill_type ( skill )

    would be sweet. In the meantime, I will continue to import and parse all of classskills.txt

    Edit: looks like I was working on this last one exactly 3 years ago today! Happy New year.
    Edit 2: also, at exactly the same time of day. Now I am freaking myself out. How do I party? By working on Mafia scripts. Maybe I need to get out more.

  8. #8
    Senior Member ckb's Avatar
    Join Date
    Mar 2006
    Posts
    954

    Default

    Maybe this happend some time in the last 3 years and I never noticed, but apparently there are now proxy fields for $skills:
    .song
    .expression
    .walk

    This should solve my issues. And someone can mark this request implemented. Thanks from the past!

  9. #9
    Developer
    Join Date
    Aug 2009
    Posts
    2,975

    Default

    Also, .combat, .passive, .buff, and .summon give you... most of the rest of the categories. Nothing explicitly specifies categories 2-4, 7 (but you can call to_effect(skill) to get 3/4, I guess).

  10. #10
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    12,893

    Default

    Revision 19910.

Similar Threads

  1. Replies: 0
    Last Post: 05-22-2015, 08:13 PM
  2. 15032: Add summon proxy field to skills.
    By RSS Bot in forum Latest SVN Changes
    Replies: 0
    Last Post: 12-11-2014, 09:54 AM
  3. Replies: 0
    Last Post: 01-25-2014, 08:51 PM
  4. Feature - Implemented Add image proxy field to skills.
    By Bale in forum Bug Reports
    Replies: 11
    Last Post: 01-02-2014, 08:31 PM
  5. Feature Add skill type field(s) to proxy records
    By zarqon in forum Bug Reports
    Replies: 1
    Last Post: 05-07-2011, 02:32 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •