eMafia Scripting
Register

User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 50 of 82
  1. ISO #1

    Post eMafia Scripting

    This thread was made to be tutorial/manual for eMafia Role Creation.

    The main concept around eMafia is to allow the players to choose how they want to play their game. And what is the biggest influence on a Mafia game? The roles of course! The roles define almost everything from the Setup, the player reaction, ability to do things, and the mystery. It's what makes or break a game setup.

    Making your own role is more of an advanced step and may be more suited for players wanting to setup FM like games.

    If your looking for a simple renaming of a role to suit a match's theme, at some later release Apo plans to have the ability to without creating a whole new role.

    A Role consists of these items:
    Name
    Affiliation (Town,Mafia,Neutral,ect)
    Category (CORE,INVESTIGATIVE,EVIL,ect) up to two

    Team options: (If being on Team is enabled)
    Team name Defaults to Affiliation name
    Teammates visible On/Off (Think of Cult,Mason,Mafia/ Town is indeed a team, you just don't know who is who)
    Share Night chat On/off (Simplifies creating chat channels without the need of scripts)
    Share Win On/Off, All members of the team win as long as the team wins

    Action Category:name of category to go into (Heal,Roleblock,Kill,Invest, ect)

    Number of Day Targets: 0-2
    Number of Night Targets: 0-2

    Who you may target during Day:
    Who you may target during Night:
    Options currently include:
    Everyone
    Everyone except self
    Only self
    *Everyone except team
    *All of team
    *All of team except self

    Event Scripts(all optional):Each role performs the script based time of day
    onStartup - Just before game starts, allows exec to choose a random player, sets number of shots for vig, ect(only runs once)
    onDayStart - Just before the Day discussion starts, player deaths happen just before this event
    onDayTargetChoice - When a target is clicked during the day(if the role has the option to)
    onDayEnd - Just before the day is over and after a lynch
    onNightStart - Just before night starts
    onNightTargetChoice - When a target is clicked during the night(if the role has the option to)
    onNightEnd - Just before night ends. Most night actions such as attacking,blocking,healing,ect happen at this moment
    onVisit - When the player is visited ( .visit() ) ,the visited player runs script.. includes player object 'visitor'
    onAttacked - When the player is attacked ( .attack(int,String,String) ) ,the attacked player runs script.. includes player object 'visitor'
    onDeath - When the player is killed
    *onLynch - When the player is lynched

    Victory Condition Script(optional):
    Game Endable Script(optional):
    When 'Team Share Win' is enabled, Victory Condition and Game Endable become the script for the entire Team, 'self' scriptObject is no longer usable and is instead replaced with 'team' due to the fact you are controlling a group rather than an individual.

    ---------------------------------------------------

    Now just to give you a quick example of a common default role, Whee:

    Name: Doctor
    Affiliation: TOWN
    Category: CORE PROTECTIVE

    Action Category: Heal

    onTeam: ON
    Team Name: (blank)
    Teammates visible OFF
    Share Night chat OFF
    Share Win ON

    Number of Day Targets: 1
    Number of Night Targets: 0
    Who you may target during Day: Everyone except self

    (During the example of these scripts the object references 'match', 'self', and sometimes 'team' are already provided)

    onNightTargetChoice:
    var target = self.getTarget1();
    if(target != null){
    self.text("You will heal "+target.getName()+" tonight.");
    }
    else{
    self.text("You will not heal anyone tonight.");
    }

    onNightEnd:
    if(self.isAlive()){
    if(!self.hasFlag("ROLEBLOCKED")){
    var target = self.getTarget1();
    if(target != null){
    self.visit(target);
    target.setHp(target.getHp() + 1);
    target.addFlag("healInform");
    target.getFlag("healInform").setScriptPost("onAtta cked","
    var doc = match.getPlayer("+self.getPlayerNum()+");
    if(doc != null){
    doc.text(\"Your target looks to have been attacked! Atleast you arrived to perform surgery.\");
    self.text(\"Luckly, someone came to your rescue and performed surgery!\");
    }
    ");
    target.getFlag("healInform").setScriptPre("onDaySt art","
    self.removeFlag(\"healInform\");
    ");
    }
    }
    }

    Victory Conditon: (Team Shared)
    if(!match.isAffAlive("MAFIA")){
    if(!match.isCatAlive("EVIL")){
    team.setVictory(true);
    }
    }

    Game Endable: (Team Shared) (this could have been combined in Victory Condition)
    if(team.getVictory()){
    team.setMayGameEnd(true);
    }

    -----------------------------------------------------------------

    To some this may look complex, to others maybe not.

    In english, this is what is happening:
    During night, when the player selects a target(or selects it again to cancel),
    -display "You will heal (name here) tonight." to the user.

    After night ends, the game processes all night actions, the Heal actionCategory is next:
    If the doctor is not roleblocked or dead
    The player first visits the target.
    -Increase the target's health by 1
    -Creates a flag labeled 'healInform' (all this is going to do is inform the player and text about the healing if there is an attacker.
    -Adds a script to run on the target in the event that the target is attacked containing:
    -Tell my player "Your target looks to have been attacked! Atleast you arrived to perform surgery."
    -Tell my target "Luckly, someone came to your rescue and performed surgery!" (They were most likly informed they were attacked first)
    -Remove the flag at Day Start

    -----------------------------------------------------------------------------
    Mafiaso script example:


    onNightTargetChoice:
    var target = self.getTarget1();
    if(target != null){
    if(self.getVarInt("lastTarget") != 0){
    team.pollVoteRemove("killTarget",self.getVarInt("l astTarget"));
    }
    team.pollVoteAdd("killTarget",target.getPlayerNum( ));
    self.setVarInt("lastTarget",target.getPlayerNum()) ;
    team.text(self.getName()+" suggests to kill "+target.getName()+" tonight.");
    }
    else{
    if(self.getVarInt("lastTarget") != 0){
    team.pollVoteRemove("killTarget",self.getVarInt("l astTarget"));
    }
    team.text(self.getName()+" withdraws their suggestion to kill anyone tonight.");
    }

    Godfather script example:

    onStartup:
    team.setScript("onNightEnd","
    var killer;
    var numMafiaioso = team.numRoleAlive(4);
    var mafiaosos = new Array();
    var loop = 0;
    for(var player : team.getAliveTeammates()){
    if(player.getRoleId() == 4){//mafiaso
    player.clearTargets();
    mafiaosos[loop] = player;
    loop++;
    }
    if(player.getRoleId() == 7){//godfather
    player.clearTargets();
    killer = player;
    }
    }
    var targetNum = team.getVarInt(\"GFKillTarget\");
    if(targetNum == 0){//group vote(gf didnt decide)
    targetNum = team.pollHighestVote(\"killTarget\");
    }
    if(targetNum > 0){
    if(numMafiaioso >= 0){//if there are mafiaso
    //random mafiaoso will kill
    killer = match.randomPlayer(mafiaosos);
    }
    //else godfather will kill
    if(killer != null){
    team.text(killer.getName()+" has been sent to kill "+match.getPlayer(targetNum).getName()"+".");
    killer.setTarget1(targetNum);
    killer.addFlag("killTarget");
    killer.getFlag("killTarget").setScriptPost(\"onNig htEnd\",\"
    if(self.isAlive()){
    if(!self.hasFlag(\\\"ROLEBLOCKED\\\")){
    var target = self.getTarget1();
    if(target != null){
    self.visit(target);
    self.attack(target,\\\"Shot\\\", \\\"shot between the eyes\\\");
    }
    }
    }
    \");
    }
    }
    team.pollClear();
    team.setVarInt(\"GFKillTarget\",0)
    ");



    The main purpose of this thread is to explain how to make your own script and list of all the current commands.
    Last edited by Apocist; December 18th, 2013 at 07:46 PM. Reason: Updates: Action Category implemented and replaced Action Order #

    Quote Originally Posted by SuperJack View Post
    Look what you have caused. Seems like everyone who posted is now confused about their own gender and are venting their frustration into opinions.

  2. ISO #2

    Re: eMafia Scripting

    The scripting is made using java script, with a few object references provided to allow control over the player, other players, teams, or the match itself. Depending on what onEvent script is being run, it will provide access the certain objects.(Should I use a different word then 'object' so people understand..?)

    Object References:
    match - Always available, provides to commands control or get information of the match ongoing
    self - Available in most events, refers to the player performing the script
    team - Available in victory and endableGame events when Sharing Team Win, refers to the team the player is a member of
    visitor - Available only in onVisit or onAttacked event, refers to the player visiting the visited player running the script

    (INSERT EXPLANATION OF HOW OBJECT ORIENTED PROGRAMMING WORKS OR SOMETHING)

    Due to the game being currently developed, the list of functions will be changing, additions will be guaranteed, but here is what is in the current release:
    (For now will only provide the command names and parameters, will slowly work to explain them in time/ mostly just copy/pasted for now...you figuare it out..)

    Default Reference Class Name
    match Match

    void changePlayerRole(int playerNum, int newRoleId)
    void chatAddPlayer(String channelname,int playerNum,int talkPrive,int listenPriv)
    void chatCreate(String channelName, int timePhase)
    void chatRemovePlayer(String channelname,int playerNum)
    Player[] getAlivePlayers()
    int getDay()
    Player[] getDeadPlayers()
    int getNumPlayersAlive()
    int getNumPlayers()
    Player getPlayer(int playerNum)
    Player[] getPlayers()
    Team getTeam(String teamName)
    boolean isAffAlive(String affName)
    boolean isCatAlive(String catName)
    boolean isRoleAlive(int roleId)
    boolean isRoleExist(int roleId)
    int numRoleAlive(int roleId)
    int randomNumber(int[] numbers)
    int randomNumber(int min, int max)
    Player randomPlayer(Player[] players)
    void switchPlayerTemp(int playerNum, int playerNum2)
    void switchPlayerTemp(Player player, Player player2)
    void text(String msg)

    self / visitor Player

    void attack(int playerNumToAttack,String graveyardDesc,String DescOfDeath)
    void attack(Player playerToAttack,String graveyardDesc,String DescOfDeath)
    void addFlag(Flag flag)
    void addFlag(string flag)
    void clearTargets()
    int getActionOrder()
    String getAffiliation()
    String[] getCategory()
    Flag getFlag(String name)
    boolean getMayGameEnd()
    int getHp()
    String getName()
    int getPlayerNum()
    int getRoleId()
    String getRoleName()
    String getScript(String eventCall)
    Player getTarget1()
    Player getTarget2()
    Team getTeam()
    boolean getVarBoolean(String varName)
    int getVarInt(String varName)
    String getVarString(String varName)
    boolean getVictory()
    boolean hasFlag(String name)
    boolean isAlive()
    void removeFlag(String name)
    void setActionOrder(int order)
    void setMayGameEnd(boolean end)
    void setHp(int hpValue)
    void setScript(String eventCall, String script)
    void setTarget1(Player target)
    void setTarget2(Player target)
    void setVarBoolean(String varName,boolean value)
    void setVarInt(String varName,int value)
    void setVarString(String varName,String value)
    void setVictory(boolean win)
    void text(String msg)
    void visit(Player player)

    team Team

    void addTeammate(int playerNum)
    void addTeammate(Player player)
    Players[] getAliveTeammates()
    boolean getMayGameEnd()
    String getName()
    String getScript(String eventCall)
    Player[] getTeammates()
    boolean getVarBoolean(String varName)
    int getVarInt(String varName)
    String getVarString(String varName)
    boolean getVictory()
    boolean isRoleAlive(int roleId)
    boolean isRoleExist(int roleId)
    int numRoleAlive(int roleId){
    void pollClear(String pollName)
    int pollHighestVote(String pollName)
    void pollVoteAdd(String pollName, int option)
    void pollVoteRemove(String pollName, int option)
    void removeTeammate(int playerNum)
    void removeTeammate(Player player)
    void setScript(String eventCall, String script)
    void setVarBoolean(String varName,boolean value)
    void setVarInt(String varName,int value)
    void setVarString(String varName,String value)
    void setVictory(boolean vict)
    void text(String msg)

    (no default object) Flag

    String getScriptPost(String eventCall)
    String getScriptPre(String eventCall)
    void setScriptPost(String eventCall, String script)
    void setScriptPre(String eventCall, String script)

    .....plenty more still to do...
    Last edited by Apocist; December 13th, 2013 at 08:08 AM. Reason: Added commands

    Quote Originally Posted by SuperJack View Post
    Look what you have caused. Seems like everyone who posted is now confused about their own gender and are venting their frustration into opinions.

  3. ISO #3

    Re: eMafia Scripting

    I like the simple algorithm style. Is it Java or JavaScript?
    We are opposed to the line of compromise with imperialism. At the same time, we cannot tolerate the practice of only shouting against imperialism, but, in actual fact, being afraid to fight it. Kim Il Sung
    [CENTER]S-FM: Bus Drivers, S-FM: Trust, S-FM: Double Killers, S-FM: Double Killers Too, S-FM: Heart of the Swarm [COLOR="#FF0000"]HOST[SIZE=1]

  4. ISO #4

  5. ISO #5

    Re: eMafia Scripting

    Quote Originally Posted by ypmagic View Post
    I like the simple algorithm style. Is it Java or JavaScript?
    It was made in Java.

    Quote Originally Posted by Raptorblaze View Post
    Could we get a list of the priority levels for default roles?
    Do you mean the Order of Operations?

    Quote Originally Posted by SuperJack View Post
    Look what you have caused. Seems like everyone who posted is now confused about their own gender and are venting their frustration into opinions.

  6. ISO #6

  7. ISO #7

  8. ISO #8

    Re: eMafia Scripting

    Quote Originally Posted by RLVG View Post
    For role complexity, can we have an example Electromaniac, Bus Driver and Arsonist?
    Lol... My brain went: WTF is electro maniac?!?!?

    Anyways,
    I'll post a similar example of how arsonist will work, but requires the up coming Flag system to detect DOUSED. (On phone ATM)

    Quote Originally Posted by SuperJack View Post
    Look what you have caused. Seems like everyone who posted is now confused about their own gender and are venting their frustration into opinions.

  9. ISO #9

    Re: eMafia Scripting

    Quote Originally Posted by Apocist View Post
    Lol... My brain went: WTF is electro maniac?!?!?
    It's a FM Role, which is most likely becoming a custom in eMafia if we can make our own roles.

    Basically :
    1. Charge someone each night, making the person permanentally charged. (Like Arsonist douse)
    2. When someone charged meets another charged, both charged will become attacked.

    With more examples for scripts, we can get an idea on how to create unique roles.

  10. ISO #10

  11. ISO #11

    Re: eMafia Scripting

    How great will our ability to implement roles be? For example, would implementing a lightkeeper type role (for a day after their death, all players are anonymous) be possible with the functions we'll have access to?

    Edit: Apparently the code tag isn't being nice, removing
    Edit2: Fuck being an admin, it's parsing the <> tags as html -.- eiowfhjiouaehjsfiop[ehjsfgaeswj removing the >'s
    Edit3: Screw the entire thing, I'll find a better way of asking the first question since my admin powers hate me. I even managed to break the [s] tag because of that.

    I'm gonna consider adding a coding sub to GD with all tags of any sort disabled...

    Rephrasing original question without being able to use the tags: What is the difference between IS_AFF_ALIVE and IS_AFF_CAT and was your use of them in the victory condition code intentional?

  12. ISO #12

    Re: eMafia Scripting

    example of ele maniac:

    Electromaniac

    Has night immunity.
    May visit his target and charge them. If two charged players meets at night, they will both die.
    Charges are removed when two charged player meets.
    May target self.
    When we talked about pubs, we are talking about us.
    When they talked about pubs, they exclude themselves.
    They say only bad players want to modify citizens, and they do not satisfy bad players.
    Are we bad players? We include bad players, but that is just a part of us.
    ---They put veteran, mayor, allowed jester to visit for nothing, and they regretted and say those things are brainless.

  13. ISO #13

    Re: eMafia Scripting

    Quote Originally Posted by Raptorblaze View Post
    Also, trying desperately not to ask for list of functions because I know you already plan on posting them, but for the code [IF]<IS_AFF_ALIVE>MAFIA</IS_AFF_ALIVE> == false:
    [IF]<IS_AFF_CAT>EVIL</IS_AFF_ALIVE> == false:

    did you actually mean [IF]<IS_AFF_ALIVE>MAFIA</IS_AFF_ALIVE> == false:
    [IF]<IS_AFF_ALIVE>EVIL</IS_AFF_ALIVE> == false:? If so, what does <IS_AFF_CAT> actually check for?

    Also, how great will our ability to implement roles be? For example, would implementing a lightkeeper type role (for a day after their death, all players are anonymous) be possible with the functions we'll have access to?

    Edit: Apparently the code tag isn't being nice, removing
    Apo actually ment:
    [IF]<IS_AFF_ALIVE>MAFIA</IS_AFF_ALIVE> == false:
    [IF]<IS_CAT_ALIVE>EVIL</IS_CAT_ALIVE> == false:
    (he noticed he didn't do checks for evil roles just before posting)

    After I get the second post up, it will explain how all the functions work, but I'll answer this IF question for now.
    [IF] currently only works for boolean or integer checks. the syntax goes as follow:
    [IF](Conditions):(Script)[/IF]
    [ELSE_IF](Conditions):(Script)[/ELSE_IF]
    [ELSE](Script)[/ELSE]

    The conditions can be done like most familiar programming logic:
    a boolean(true/false)
    boolean == boolean
    boolean != boolean
    Integer (an integer above 0 is considered true)
    Integer (booleanCheck) Integer
    BooleanChecks are as follows:
    ==
    !=
    >=
    <=
    >
    <


    So in the past referenced [IF]<IS_AFF_ALIVE>MAFIA</IS_AFF_ALIVE> == false:(Script)[/IF]
    The Return 'IS_AFF_ALIVE' checks if any roles with the Affliation 'Mafia' are still living...and turns into either true or false.
    While 'IS_CAT_ALIVE' checks for Category such as CORE, KILLING, EVIL, ect... The Doctor's wining condition is being that if all Mafia and Evil roles being dead.

    Currently been multi tasking with other RL issues that had to pop up just after I posted the thread, but the list of all Functions and what they do will be put in the second post after I'm done.

    Quote Originally Posted by SuperJack View Post
    Look what you have caused. Seems like everyone who posted is now confused about their own gender and are venting their frustration into opinions.

  14. ISO #14

    Re: eMafia Scripting

    Quote Originally Posted by Raptorblaze View Post
    How great will our ability to implement roles be? For example, would implementing a lightkeeper type role (for a day after their death, all players are anonymous) be possible with the functions we'll have access to?
    These are the kind of suggestions that are needed, the answer is currently no. But it can be done through the scripting if implemented correctly, just seems a little more of an advanced feature due to editing the Match as a whole.

    I'll look in to seeing what options there are to making things like this possible.

    Quote Originally Posted by SuperJack View Post
    Look what you have caused. Seems like everyone who posted is now confused about their own gender and are venting their frustration into opinions.

  15. ISO #15

    Re: eMafia Scripting

    Quote Originally Posted by louiswill View Post
    example of ele maniac:

    Electromaniac

    Has night immunity.
    May visit his target and charge them. If two charged players meets at night, they will both die.
    Charges are removed when two charged player meets.
    May target self.
    This is why the Flag system is taking a little longer, Apo wants to find a method of attaching a script to the Flags themselves to allow more complex methods of handling how Roles can act.
    Thinking of adding the normal onDayStart/onNightEnd/ect tags to the Flags themselves and have them append to the actual player Role scripts when they are run.

    Quote Originally Posted by SuperJack View Post
    Look what you have caused. Seems like everyone who posted is now confused about their own gender and are venting their frustration into opinions.

  16. ISO #16

    Re: eMafia Scripting

    Basically we could just set different layers of values to increase complexity right?

    And the problems are if there are too many values, every new values will request a cross dimension change for every other roles,
    which increase the hardness of future developments.

    but so far,
    so far I guess there would be

    Orderoperation value
    HP value
    House number
    Faction value
    Time value


    is there a link for the dictionary of all values?

    I personally think some linear equations would cut some part for short...
    such as order of operations value currently it is 1-100

    if a role has to be between 4 and 5, then we have to move all roles above 5 with a +1.

    it would be a problem, right?
    Last edited by louiswill; October 19th, 2013 at 01:28 PM.
    When we talked about pubs, we are talking about us.
    When they talked about pubs, they exclude themselves.
    They say only bad players want to modify citizens, and they do not satisfy bad players.
    Are we bad players? We include bad players, but that is just a part of us.
    ---They put veteran, mayor, allowed jester to visit for nothing, and they regretted and say those things are brainless.

  17. ISO #17

    Re: eMafia Scripting

    Quote Originally Posted by louiswill View Post
    Basically we could just set different layers of values to increase complexity right?

    And the problems are if there are too many values, every new values will request a cross dimension change for every other roles,
    which increase the hardness of future developments.


    but so far,
    so far I guess there would be

    Orderoperation value
    HP value
    House number
    Faction value
    Time value


    is there a link for the dictionary of all values?

    I personally think some linear equations would cut some part for short...
    such as order of operations value currently it is 1-100

    if a role has to be between 4 and 5, then we have to move all roles above 5 with a +1.

    it would be a problem, right?
    Curious on what your getting at with the OoO.
    I wasn't quite sure the best method of handling which role would function first due to the fact that there can potentaily be unlimited roles.
    So Apo's first theory was to generate a list of roles and order them based on a certain value they contained.

    The long realized problem with that is the potential of different roles sharing the same value, which is way I made it a larger range of 0-100(which only delays the enviable)

    In the end it may still cause conflicts as you see. I may open to suggestions of how one may circumvent the issue of Ordering over time.

    What Apo what really like you to explain, is what you meant by the text in red.

    Quote Originally Posted by SuperJack View Post
    Look what you have caused. Seems like everyone who posted is now confused about their own gender and are venting their frustration into opinions.

  18. ISO #18

  19. ISO #19

    Re: eMafia Scripting

    Just realized some of the command desc's have some really outdated/gone commands, sleepy...past bedtime...will finish up tonight...

    Quote Originally Posted by SuperJack View Post
    Look what you have caused. Seems like everyone who posted is now confused about their own gender and are venting their frustration into opinions.

  20. ISO #20

  21. ISO #21

    Re: eMafia Scripting

    Quote Originally Posted by louiswill View Post
    Orderoperation value
    HP value
    House number
    Faction value
    Time value
    Currently, the values in each role class include the above listed items plus these:

    PlayerNum(guess house number)
    HP
    Target1
    Target2
    DeathDesc[]
    DeathType[]
    VisitedBy[]
    CustomVar[] (Save variables from scripting)

    Quote Originally Posted by SuperJack View Post
    Look what you have caused. Seems like everyone who posted is now confused about their own gender and are venting their frustration into opinions.

  22. ISO #22

    Re: eMafia Scripting

    What Apo what really like you to explain, is what you meant by the text in red.

    I meant was, new conceptions is easier to be designed by add a new value.

    Just like photoshop, which use different layers of drawing pressed together to composite a picture.

    Mafia games used different layer of values to code.

    For example, when mass murderer were put in game, a new value "House visit" were add in game,
    which provided a easier way to design MchainsawmanM but it also require a fix on this "house visit" value on existed roles.

    This become a problem when there are large quantity of roles:

    If we had 100 roles and the No.101 role require a new value, we may have to rewrite the previous 100 role cards.

    Take order of operation to say,

    if we choose already the order for 100 roles, and the No.101 role come in and have to be add between order 4 and 5,

    this new role will become 5, and everyone previously having the order value over 5 must move +1.

    So, that gives the idea of linear equations,
    The equation thing I was saying,

    instead of sign a fixed number from 1 -100, let system choose a random number A for a random role, for example, doctor,

    then system must choose another number for jailor, which is B,

    let B > A

    then there, we will have a jailor act before doctor.

    The point is that even if there are 1000000000000 roles, a new role can be simply give a sentence which give a number X

    C > B = X > A, so the new role will be able to act after role C, at same time as Role B and before Role A.

    Then we don't have to manually change the whole 1000000000000 existing role cards.

    ----------------

    well it is not very carefully thought, and might be a really bad example... which used abcd instead of 1234 and the problem is still there, but anyway....
    ----

    oh nvm I actually solved it.
    Last edited by louiswill; October 19th, 2013 at 02:33 PM.
    When we talked about pubs, we are talking about us.
    When they talked about pubs, they exclude themselves.
    They say only bad players want to modify citizens, and they do not satisfy bad players.
    Are we bad players? We include bad players, but that is just a part of us.
    ---They put veteran, mayor, allowed jester to visit for nothing, and they regretted and say those things are brainless.

  23. ISO #23

    Re: eMafia Scripting

    Quote Originally Posted by louiswill View Post
    What Apo what really like you to explain, is what you meant by the text in red.

    I meant was, new conceptions is easier to be designed by add a new value.

    Just like photoshop, which use different layers of drawing pressed together to composite a picture.

    Mafia games used different layer of values to code.

    For example, when mass murderer were put in game, a new value "House visit" were add in game,
    which provided a easier way to design MchainsawmanM but it also require a fix on this "house visit" value on existed roles.

    This become a problem when there are large quantity of roles:

    If we had 100 roles and the No.101 role require a new value, we may have to rewrite the previous 100 role cards.

    Take order of operation to say,

    if we choose already the order for 100 roles, and the No.101 role come in and have to be add between order 4 and 5,

    this new role will become 5, and everyone previously having the order value over 5 must move +1.

    So, that gives the idea of linear equations,
    The equation thing I was saying,

    instead of sign a fixed number from 1 -100, let system choose a random number A for a random role, for example, doctor,

    then system must choose another number for jailor, which is B,

    let B > A

    then there, we will have a jailor act before doctor.

    The point is that even if there are 1000000000000 roles, a new role can be simply give a sentence which give a number X

    C > B = X > A, so the new role will be able to act after role C, at same time as Role B and before Role A.

    Then we don't have to manually change the whole 1000000000000 existing role cards.

    ----------------

    well it is not very carefully thought, and might be a really bad example... which used abcd instead of 1234 and the problem is still there, but anyway....
    ----

    oh nvm I actually solved it.
    Apo could also change the priority from an integer to a float or double and then just have the system sort any present roles by priority value. This would allow for effectively infinite (too many to ever be a real issue) priority levels.

  24. ISO #24

    Re: eMafia Scripting

    Quote Originally Posted by Raptorblaze View Post
    Apo could also change the priority from an integer to a float or double and then just have the system sort any present roles by priority value. This would allow for effectively infinite (too many to ever be a real issue) priority levels.
    Right, but I was use OoO as example to say that if we could make more values associated in a equation or some sort,

    then we can have more complexcity in less layers of values. I am really disgusted by the house visit thing, lol.
    When we talked about pubs, we are talking about us.
    When they talked about pubs, they exclude themselves.
    They say only bad players want to modify citizens, and they do not satisfy bad players.
    Are we bad players? We include bad players, but that is just a part of us.
    ---They put veteran, mayor, allowed jester to visit for nothing, and they regretted and say those things are brainless.

  25. ISO #25

    Re: eMafia Scripting

    Quote Originally Posted by louiswill View Post
    Right, but I was use OoO as example to say that if we could make more values associated in a equation or some sort,

    then we can have more complexcity in less layers of values. I am really disgusted by the house visit thing, lol.
    Raptr had a quick and easy fix. But have a more secure way like you were talking about would be better. Apo just doesn't want to have to reference to other Roles if possible.

    And which house visiting does the Louis not like?

    Quote Originally Posted by SuperJack View Post
    Look what you have caused. Seems like everyone who posted is now confused about their own gender and are venting their frustration into opinions.

  26. ISO #26

    Re: eMafia Scripting

    Quote Originally Posted by Apocist View Post
    Raptr had a quick and easy fix. But have a more secure way like you were talking about would be better. Apo just doesn't want to have to reference to other Roles if possible.

    And which house visiting does the Louis not like?
    The house visiting thing make game more confused.

    I recall that

    1.bodyguard(right?) will follow its target to its target's target's house and get killed by mm.
    Annnd detective wont. Anyway, it is some the most confusing thing.

    2. jailor visit target but wont visit its house. and MM has to kill jailor by visit jailor, but its prisoner who was at the house will not be attacked?

    3. Witch cause target to visit target house.

    4. No role can detect house visit except mm. Detective and lookout only know actual target.

    5.There is a high prized achievement about visiting without explain how those things work.
    ---------- so far

    Anyway, I tried really hard to figure those out.

    It is fun but...kinda frustrating to think for most players.
    Last edited by louiswill; October 19th, 2013 at 03:02 PM.
    When we talked about pubs, we are talking about us.
    When they talked about pubs, they exclude themselves.
    They say only bad players want to modify citizens, and they do not satisfy bad players.
    Are we bad players? We include bad players, but that is just a part of us.
    ---They put veteran, mayor, allowed jester to visit for nothing, and they regretted and say those things are brainless.

  27. ISO #27

    Re: eMafia Scripting

    For roles like Arsonist, Electromaniac, etc. that imbue roles with a "status," you could have a status variable that's 1 by default and gets multiplied by a certain number whenever the status is inflicted. Every status would be a different prime factor so combinations are unique and operations to the status only operate within that specific factor.

    Ex: Arsonist x2, Electromaniac x3, Gunsmith x5. Someone who is doused and given a gun has a value of 10, which is unique to that combination of statuses.

    An Arsonist's burn would check all players statuses for divisibility by 2, and -1 HP for the players that return true.

  28. ISO #28

    Re: eMafia Scripting

    Quote Originally Posted by CarolinaCrown View Post
    For roles like Arsonist, Electromaniac, etc. that imbue roles with a "status," you could have a status variable that's 1 by default and gets multiplied by a certain number whenever the status is inflicted. Every status would be a different prime factor so combinations are unique and operations to the status only operate within that specific factor.

    Ex: Arsonist x2, Electromaniac x3, Gunsmith x5. Someone who is doused and given a gun has a value of 10, which is unique to that combination of statuses.

    An Arsonist's burn would check all players statuses for divisibility by 2, and -1 HP for the players that return true.
    That is a great example of what I was trying to say.

    Instead of add a new value of douse, value of charging, use a value that is shared by those roles.

    It is hard though, and may be new player unfriendly.
    When we talked about pubs, we are talking about us.
    When they talked about pubs, they exclude themselves.
    They say only bad players want to modify citizens, and they do not satisfy bad players.
    Are we bad players? We include bad players, but that is just a part of us.
    ---They put veteran, mayor, allowed jester to visit for nothing, and they regretted and say those things are brainless.

  29. ISO #29

    Re: eMafia Scripting

    So as long as the modulus operator (%) is implemented in <MATH>, the status thing could work. The only thing is, status effects that don't depend on the status giver's actions have to be dealt with by looping over all players in the status giver's code so not to modify the other roles' scripts. I'm not sure how to deal with the OoO issues that could obviously arise, since I assume the "onNightEnd" action is run based on the role's priority.

    Here's an example Electromaniac night action code I wrote up because I was bored:


    define <HAS_STATUS_EFF>(player),(status effect)</HAS_STATUS_EFF>:
    return <MATH><GET_STATUS>(player)</GET_STATUS> % (status effect)</MATH> == 0

    define <SET_STATUS_EFF>(player),(status effect)</SET_STATUS_EFF>:
    <SET_STATUS>(player),<MATH><GET_STATUS>(player)</GET_STATUS> * (status effect) </MATH></SET_STATUS>

    define <REMOVE_STATUS_EFF>(player),(status_effect)</REMOVE_STATUS_EFF>
    <SET_STATUS>(player),<MATH><GET_STATUS>(player)</GET_STATUS> / (status effect) </MATH></SET_STATUS>

    onNightEnd:
    //Choose target; kill if already charged, charge if uncharged
    [IF]<TARGET1>:
    [IF]<HAS_STATUS_EFF><TARGET1>,<STATUS_EFFECT></HAS_STATUS_EFF>:
    <SET_HP><TARGET1>,<MATH><GET_HP><TARGET1></GET_HP> - 1 </MATH></SET_HP>
    <REMOVE_STATUS_EFF><TARGET1>,<STATUS_EFFECT></REMOVE_STATUS_EFF>
    [TEXT_TO]<TARGET1>,You were electrocuted![/TEXT_TO]
    [/IF]
    [ELSE]
    <SET_STATUS_EFF><TARGET1>,<STATUS_EFFECT></SET_STATUS_EFF>
    [TEXT_TO]<TARGET1>,You were charged by an Electromaniac![/TEXT_TO]
    [/ELSE]
    [TEXT]You charged <TARGET1>.[/TEXT]
    [/IF]
    //Check global visits for charged players visiting each other
    [FOREACH] <ALIVEPLAYERS>
    [IF]<HAS_STATUS_EFF><FORVAR>,<STATUS_EFFECT></HAS_STATUS_EFF>:
    [IF]<HAS_STATUS_EFF><GET_TARGET1><FORVAR></GET_TARGET1>,<STATUS_EFFECT></HAS_STATUS_EFF>:
    <SET_HP><FORVAR>,<MATH><GET_HP><FORVAR> - 1 </MATH></SET_HP>
    <SET_HP><GET_TARGET1><FORVAR></GET_TARGET1>,<MATH><GET_HP><GET_TARGET1><FORVAR></GET_TARGET1></GET_HP> - 1 </MATH></SET_HP>
    [TEXT_TO]<FORVAR>,You were electrocuted![/TEXT_TO]
    [TEXT_TO]<GET_TARGET1><FORVAR></GET_TARGET1>,You were electrocuted![/TEXT_TO]
    <REMOVE_STATUS_EFF><FORVAR>,<STATUS_EFFECT></REMOVE_STATUS_EFF>
    <REMOVE_STATUS_EFF><GET_TARGET1><FORVAR></GET_TARGET1>,<STATUS_EFFECT></REMOVE_STATUS_EFF>
    [/IF]
    [IF]<HAS_STATUS_EFF><GET_TARGET2><FORVAR></GET_TARGET2>,<STATUS_EFFECT></HAS_STATUS_EFF>:
    <SET_HP><FORVAR>,<MATH><GET_HP><FORVAR> - 1 </MATH></SET_HP>
    <SET_HP><GET_TARGET2><FORVAR></GET_TARGET2>,<MATH><GET_HP><GET_TARGET2><FORVAR></GET_TARGET2></GET_HP> - 1 </MATH></SET_HP>
    [TEXT_TO]<FORVAR>,You were electrocuted![/TEXT_TO]
    [TEXT_TO]<GET_TARGET2><FORVAR></GET_TARGET2>,You were electrocuted![/TEXT_TO]
    <REMOVE_STATUS_EFF><FORVAR>,<STATUS_EFFECT></REMOVE_STATUS_EFF>
    <REMOVE_STATUS_EFF><GET_TARGET2><FORVAR></GET_TARGET2>,<STATUS_EFFECT></REMOVE_STATUS_EFF>
    [/IF]
    [/IF]
    [/FOREACH]

    <STATUS_EFFECT> For all roles would default to 1 and be automatically generated for status givers in the "onStartup" section to be unique to the role.


    Okay that took longer than I thought. I guess louiswill is kind of right, this kind of stuff would be hard and new player unfriendly, but new players probably aren't going to be the ones making these complicated roles.

    I'm actually having fun with this so I may draft the rest of this role . After all, the night action is the hard part. Let me know if you're masochistic enough to look through that code and something doesn't seen right.

    Apocist, is there any chance you'd add an option to name the variable produced by [FOREACH] to allow for nested loops? Right now I can't think of a situation where you'd need them but you never know!

    Also I didn't say it before but I'm very excited for this project! I think it'll be awesome to have something with the automation of SC2Mafia and the customization of the FMs. Keep up the good work!
    Last edited by CarolinaCrown; October 19th, 2013 at 08:17 PM.

  30. ISO #30

    Re: eMafia Scripting

    Quote Originally Posted by Raptorblaze View Post
    How great will our ability to implement roles be? For example, would implementing a lightkeeper type role (for a day after their death, all players are anonymous) be possible with the functions we'll have access to?

    Edit: Apparently the code tag isn't being nice, removing
    Edit2: Fuck being an admin, it's parsing the <> tags as html -.- eiowfhjiouaehjsfiop[ehjsfgaeswj removing the >'s
    Edit3: Screw the entire thing, I'll find a better way of asking the first question since my admin powers hate me. I even managed to break the [s] tag because of that.

    I'm gonna consider adding a coding sub to GD with all tags of any sort disabled...

    Rephrasing original question without being able to use the tags: What is the difference between IS_AFF_ALIVE and IS_AFF_CAT and was your use of them in the victory condition code intentional?

    Everything past this point on the post will be struck.<ishnfd</ishnfd>
    [b]?[/b]

    You cannot do it even like that?

  31. ISO #31

  32. ISO #32

    Re: eMafia Scripting

    Quote Originally Posted by Raptorblaze View Post
    Doesn't remove html apparently. One of my edits tried that.
    Btw you striking it out up there makes all User names in TapaTalk(IPhone forum reading app) appear crossed out :P

    Edit: on PC Firfox, it crosses out my posting buttons
    Last edited by Apocist; October 19th, 2013 at 10:39 PM.

    Quote Originally Posted by SuperJack View Post
    Look what you have caused. Seems like everyone who posted is now confused about their own gender and are venting their frustration into opinions.

  33. ISO #33

    Re: eMafia Scripting

    But yeah, as for your Status effects, or Flags as Apo's been calling them; His idea was to be able to set them using a String name like
    <HAS_FLAG>(playerNum),(flagName)</HAS_FLAG> (or STATUS_EFFECT whatever people prefer, renaming any of the commands listed is easy and should be done as early as possible)

    Flags will be there own dataholder classes so they might hold their own scripts within the role's they are affecting themselves. He wants to see how it will turn out when they each have the same onEvent triggers, which may trigger (before or after?)) the Role's onEvents trigger.

    This way actions like if Visiting another player, the Flag will add a script that will first invoke a check with the Target <Has_Status_Effect><Target1>,CHARGED</Has_Status_Effect>?, if so kill both players, if not Charge the Target as well.

    Quote Originally Posted by SuperJack View Post
    Look what you have caused. Seems like everyone who posted is now confused about their own gender and are venting their frustration into opinions.

  34. ISO #34

    Re: eMafia Scripting

    Quote Originally Posted by CarolinaCrown View Post
    Apocist, is there any chance you'd add an option to name the variable produced by [FOREACH] to allow for nested loops? Right now I can't think of a situation where you'd need them but you never know!
    Yup, nested [FOREACH] currently wouldn't be possible, this was simplely a quick fix for Oops requests for arrays, had to revamp the entire way arguments were passed between functions and how Java was invoking them.

    In fact <FORVAR> isn't even a Function/Return, merely a replaceable string. Originally Apo thought to have the current cycled value save to the Role's customVar scheme like so
    [FOREACH]player <ALIVEPLAYERS>:
    [TEXT_TO]<NAME_OF><VAR>player</VAR></NAME_OF>,You were electrocuted![/TEXT_TO]
    [/FOREACH]

    But choose not to cause it looked bad to save it permanently. But he can put this back in instead.

    Quote Originally Posted by SuperJack View Post
    Look what you have caused. Seems like everyone who posted is now confused about their own gender and are venting their frustration into opinions.

  35. ISO #35

    Re: eMafia Scripting

    I'm really perplexed as to why you're using some weird HTML/BBcode mashup as the style for a procedural language. I mean, this:https://www.sc2mafia.com/forum/showth...l=1#post389444
    looks hideous and incredibly painful to deal with.

    EDIT: not to mention admins can't post it because it gets parsed as HTML and completely fucks the page layout lol.
    Last edited by oops_ur_dead; October 20th, 2013 at 12:40 PM.

  36. ISO #36

    Re: eMafia Scripting

    Quote Originally Posted by oops_ur_dead View Post
    I'm really perplexed as to why you're using some weird HTML/BBcode mashup as the style for a procedural language. I mean, this:https://www.sc2mafia.com/forum/showth...l=1#post389444
    looks hideous and incredibly painful to deal with.

    EDIT: not to mention admins can't post it because it gets parsed as HTML and completely fucks the page layout lol.
    Yeah... I was wondering why Java looked like shit.
    We are opposed to the line of compromise with imperialism. At the same time, we cannot tolerate the practice of only shouting against imperialism, but, in actual fact, being afraid to fight it. Kim Il Sung
    [CENTER]S-FM: Bus Drivers, S-FM: Trust, S-FM: Double Killers, S-FM: Double Killers Too, S-FM: Heart of the Swarm [COLOR="#FF0000"]HOST[SIZE=1]

  37. ISO #37

  38. ISO #38

    Re: eMafia Scripting

    [IF]<TARGET1>:
    [TEXT]You will heal <NAME_OF><TARGET1></NAME_OF> tonight.[/TEXT]
    [/IF]
    [ELSE]
    [TEXT]You will not heal anyone tonight.[/TEXT]
    [/ELSE]

    --------------

    if (onNightTargetChoice == TARGET1) {
    System.out.println("You will heal" + TARGET1 + "tonight.");
    }
    else {
    System.out.println("You will not heal anyone tonight.");
    }

    ----------

    Just saying... that looks so organized. Those braces are getting me confused xD
    And wouldn't showing the name have to be in a conditional if there's a Witch in the game?

    edit: btw, what's the variable TARGET1 for?
    Last edited by ypmagic; October 20th, 2013 at 03:30 PM.
    We are opposed to the line of compromise with imperialism. At the same time, we cannot tolerate the practice of only shouting against imperialism, but, in actual fact, being afraid to fight it. Kim Il Sung
    [CENTER]S-FM: Bus Drivers, S-FM: Trust, S-FM: Double Killers, S-FM: Double Killers Too, S-FM: Heart of the Swarm [COLOR="#FF0000"]HOST[SIZE=1]

  39. ISO #39

    Re: eMafia Scripting

    I'll agree, the syntax looks pretty ugly, but it seems easy for people with little to no experience with coding. I'm betting the reason it's a bbcode/html bastard child is that it's simple for someone new to it.

    Personally, I would make it so that brackets for variables and returns are different({TARGET1} vs. <GET_TARGET1>) and have brackets stack [<{}>] rather than have the [/end] syntax - that would make it a little prettier at least. Then again, I'm not the one making it, and I'm also kind of a noob at coding...

    @ypmagic, since it's procedural, a lot of it depends on the ease of parsing. The whole point is that eMafia is supposed to parse your code as code, so to do it your way Apo would essentially have to make Java parse Java as Java, which is not as simple as it sounds. Certainly doable, but why do it when you don't need all the utility of Java? The needs of an eMafia role-creation script are extremely limited compared to an all-purpose language like Java, and it seems like Apo's scripting already has a fair bit of utility beyond its purpose.

  40. ISO #40

    Re: eMafia Scripting

    Quote Originally Posted by ypmagic View Post
    Yeah... I was wondering why Java looked like shit.
    Quote Originally Posted by ypmagic View Post
    [IF]:
    [TEXT]You will heal tonight.[/TEXT]
    [/IF]
    [ELSE]
    [TEXT]You will not heal anyone tonight.[/TEXT]
    [/ELSE]

    --------------

    if (onNightTargetChoice == TARGET1) {
    System.out.println("You will heal" + TARGET1 + "tonight.");
    }
    else {
    System.out.println("You will not heal anyone tonight.");
    }

    ----------

    Just saying... that looks so organized. Those braces are getting me confused xD
    And wouldn't showing the name have to be in a conditional if there's a Witch in the game?

    edit: btw, what's the variable TARGET1 for?
    I can't tell if you're saying that Java looks like shit or this markup thing looks like shit.

    Quote Originally Posted by CarolinaCrown View Post
    I'll agree, the syntax looks pretty ugly, but it seems easy for people with little to no experience with coding. I'm betting the reason it's a bbcode/html bastard child is that it's simple for someone new to it.

    Personally, I would make it so that brackets for variables and returns are different({TARGET1} vs. ) and have brackets stack [<{}>] rather than have the [/end] syntax - that would make it a little prettier at least. Then again, I'm not the one making it, and I'm also kind of a noob at coding...

    @ypmagic, since it's procedural, a lot of it depends on the ease of parsing. The whole point is that eMafia is supposed to parse your code as code, so to do it your way Apo would essentially have to make Java parse Java as Java, which is not as simple as it sounds. Certainly doable, but why do it when you don't need all the utility of Java? The needs of an eMafia role-creation script are extremely limited compared to an all-purpose language like Java, and it seems like Apo's scripting already has a fair bit of utility beyond its purpose.
    It isn't simple though. It has all the complexity of any other scripting language except it looks terrible and is functionally inferior.

    Also using Java as a scripting language for the roles would be terrible, I agree. But there are many more feasible ideas such as Lua, Javascript, or Python, all of which would not only be more powerful but also be easier for apo to implement (seeing as how there are many high-quality parsers for all the languages I listed) as well as easier to use for end-users (massive amount of documentation, extensive libraries and pre-written code available, and large number of tools that can deal with those languages). Not sure why apo didn't just go with one of those from the beginning. Just as a point of comparison, I wrote a mafia "engine" of sorts a short while ago that uses Javascript, source code right here: https://github.com/extermistmonk/mafiaplusplus with an example role (sheriff) here: https://pastebin.com/SiYLqXwH

  41. ISO #41

    Re: eMafia Scripting

    There were many reasons Apo implemented the scripting as it was; Needed system that was easy to parse, yet allows the functionality to perform the needed tasks( while at the same time restricting access to only Roles or the Match itself since the script is designed to handle unmonitored role creation). This literally was Apo's first project in Java, so the parsing was limited to what he know he could handle at the time, while still providing a easy to the users. As for not looking towards other scripting solutions? Simple, the project is almost purely created from scratch with as little exterior resources as possible just as the project was intended to be.

    The way the parsing system is setup, changes can be made(with more time). The system was designed to allow user created scripting errors not to affect anything other than the single command itself. Command are parsed and processed much easier when they are allowed to be side by side, without having to handle things like (var i = 5;) The HTML/bbCode style could be easily change to (if(isAffAlive("Mafia"){textUser("Brain fart")}), well maybe not as easily now that Apo would have to handle "" string in addition to combining vars/functions beside them such as (textUser("Welcome "+getName()+"!")).

    Anything not within [] or <> is ignored as garbage, seemed to be the simplest way to process each and ever command. Always open for suggestions, whats the point to have something made if no one likes it. The only issue it handling the way things work.

    Quote Originally Posted by CarolinaCrown View Post
    Personally, I would make it so that brackets for variables and returns are different({TARGET1} vs. <GET_TARGET1>)
    Are you suggesting something like <TARGET1> to be {TARGET1} ? Or are you suggesting the seperate looks of variables vs returns?
    In all honesty, their are no variables. the so called 'returns' or things like <TARGET1> are just functions that turn into what the function does.

    In other words <Command> is replaced by .... something, in this way it makes it easy to handle items without the need of String Building, which would be required of other scripting methods

    Quote Originally Posted by CarolinaCrown View Post
    and have brackets stack [<{}>] rather than have the [/end] syntax
    What do you mean stack? Gimme an example, because the long commands are indeed annoying.
    Last edited by Apocist; October 21st, 2013 at 05:27 AM. Reason: Additional text

    Quote Originally Posted by SuperJack View Post
    Look what you have caused. Seems like everyone who posted is now confused about their own gender and are venting their frustration into opinions.

  42. ISO #42

    Re: eMafia Scripting

    Quote Originally Posted by ypmagic View Post
    And wouldn't showing the name have to be in a conditional if there's a Witch in the game?

    edit: btw, what's the variable TARGET1 for?
    Night would not have ended at the time of onNightTargetChoice, So the witch would not have affected anyone yet.
    onNightTargetChoice happens as soon a the User clicks/chooses a target.

    TARGET1 and TARGET2 merely get the PlayerNumber of the targets choosen to be visit(TARGET2 would only be used if one is allowed a second target like a witch/busdriver/ect)...like if one were to choose to visit... Albert, and Albert's playerNumber is 4, TARGET1(which is 0 by default for visiting no one) would be set to 4, Then the onNightTargeChoice script would be run.

    Therefore onNightTargetChoice and onDayTargetChoice events are unaffected by the order of operations. It is merely an event that happens when the user clicks a player to visit.
    Last edited by Apocist; October 21st, 2013 at 05:11 AM.

    Quote Originally Posted by SuperJack View Post
    Look what you have caused. Seems like everyone who posted is now confused about their own gender and are venting their frustration into opinions.

  43. ISO #43

    Re: eMafia Scripting

    Quote Originally Posted by Apocist View Post
    What do you mean stack? Gimme an example, because the long commands are indeed annoying.
    Maybe something like [IF| {TARGET1}: <SET_HP|{TARGET1},0>]

    As for the return vs. variable things, I'm just noticing a difference between the returns that you have to specifically end and the returns that you don't (e.g. <TARGET1> is never accompanied by </TARGET1>, but <GET_HP> always has a partner </GET_HP_>)

  44. ISO #44

    Re: eMafia Scripting

    Quote Originally Posted by CarolinaCrown View Post
    As for the return vs. variable things, I'm just noticing a difference between the returns that you have to specifically end and the returns that you don't (e.g. <TARGET1> is never accompanied by </TARGET1>, but <GET_HP> always has a partner </GET_HP_>)
    The reason <TARGET1> doesn't need a close command </TARGET1> is because the command doesn't require any information.
    How ever <TARGET1_OF>5</TARGET1_OF> requires a closing cmd due to containing the information (5). <TARGET1> is essentially a short version of <TARGET1_OF><PLAYER_NUMBER></TARGET1_OF>.

    For comparison to common programming methods:
    target1() vs target1Of(5)

    Quote Originally Posted by SuperJack View Post
    Look what you have caused. Seems like everyone who posted is now confused about their own gender and are venting their frustration into opinions.

  45. ISO #45

    Re: eMafia Scripting

    Well there has been no comments, so Apo assumes its the majority vote to change the syntax style.

    Working on the traditional coding scheme plus the "" stringBuilder.

    Quote Originally Posted by SuperJack View Post
    Look what you have caused. Seems like everyone who posted is now confused about their own gender and are venting their frustration into opinions.

  46. ISO #46

  47. ISO #47

    Re: eMafia Scripting

    Quote Originally Posted by Raptorblaze View Post
    I'd just like something that looks cleaner personally. function(vars) is just a very nice way of laying it out rather than [function]vars[/function], especially when you are inconsistent and omit the [/function] if it doesn't need inputs. (I used brackets, you use <'s, it's irrelevant to the point)
    Point taken.

    Currently attempting oops suggestion of implementing javascript because Apo don't want to waste all his time rewriting another parsing scheme.
    Just looking at all the documentation and examples, trying to figure out how to restrict access from the Java environment as a whole(stick to bindings) and omit many of the existing javascript functions that one should not be allowed access to.

    Quote Originally Posted by SuperJack View Post
    Look what you have caused. Seems like everyone who posted is now confused about their own gender and are venting their frustration into opinions.

  48. ISO #48

    Re: eMafia Scripting

    Quote Originally Posted by Apocist View Post
    Point taken.

    Currently attempting oops suggestion of implementing javascript because Apo don't want to waste all his time rewriting another parsing scheme.
    Just looking at all the documentation and examples, trying to figure out how to restrict access from the Java environment as a whole(stick to bindings) and omit many of the existing javascript functions that one should not be allowed access to.
    If you can't, just finding a way to make your original design look cleaner would be perfectly acceptable as well. Maybe [function=vars] or [function] if it has no vars would work better? (replace my ['s with <'s since I can't use them because it parses my text...)

  49. ISO #49

    Re: eMafia Scripting

    Quote Originally Posted by Raptorblaze View Post
    If you can't, just finding a way to make your original design look cleaner would be perfectly acceptable as well. Maybe [function=vars] or [function] if it has no vars would work better? (replace my ['s with <'s since I can't use them because it parses my text...)
    Oh, apo noted earlier that returns or functions that don't need a parameter/argument do not require a [/end block] / </end block>.

    Quote Originally Posted by SuperJack View Post
    Look what you have caused. Seems like everyone who posted is now confused about their own gender and are venting their frustration into opinions.

  50. ISO #50

    Re: eMafia Scripting

    Quote Originally Posted by Apocist View Post
    Point taken.

    Currently attempting oops suggestion of implementing javascript because Apo don't want to waste all his time rewriting another parsing scheme.
    Just looking at all the documentation and examples, trying to figure out how to restrict access from the Java environment as a whole(stick to bindings) and omit many of the existing javascript functions that one should not be allowed access to.
    Javascript is a great idea.
    Spoiler : FM Experience :
    Spoiler : L-FM :
    FMXVII FM Roronoa Zoro - Obvious Jester - Lost, FMXVII FM Ryan - Citizen -Lost
    Spoiler : S-FM :
    S-FM 81 Bus Drivers: Bus Driver - Lost, S-FM 86 Plane Crash: Jailor Won, S-FM 84 Heart of The Swarm: Citizen - Won, S-FM 82 Colonization: Host - 3 Town Survivors, S-FM 71 MLP FiM I: Doctor - Lost, S-FM 68 Democracy: Citizen - Lost

 

 

Similar Threads

  1. eMafia Introduction
    By Apocist in forum General Discussion
    Replies: 64
    Last Post: May 28th, 2014, 04:49 PM

Posting Permissions

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