Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

How to write Rules?
wolfforlunch
#1 Posted : Wednesday, December 17, 2014 7:28:38 PM(UTC)
Rank: Newbie

Groups: Registered
Posts: 4

Hi there,

I was wondering if anyone can help me out by telling me simple start up scripts for me to write deck rules?
or at least tell me what language the bot uses?
I'm just slightly confused.

Thanks in advance
JoyAdmin
#2 Posted : Thursday, December 18, 2014 12:53:17 AM(UTC)
Rank: Administration

Groups: Administrators
Posts: 4,849

Thanks: 805 times
Was thanked: 4539 time(s) in 1637 post(s)
The bot uses c# but Deck rule is build with a kind of simple 'natural language' like script, you can reference to samples in default deck rule file to learn how to use it.

1.Copy DeckRules_Default.xlsx with a new name in the same folder.
2.Edit this new file as your own deck rule file.
3.Select this file in task editor for your selected deck.



ragnarok214
#3 Posted : Thursday, December 18, 2014 2:49:58 PM(UTC)
Rank: Newbie

Groups: Registered
Posts: 9
Location: Canada

Thanks: 1 times
Hi I am also interested in writing my own rules. Looking at the samples doesn't really help as it's not that self explanatory. For instance, what are 'Action Gains' and what is that column for. What's the difference between all these keywords as referenced in one of the samples:

CAST IF
ATTACK IF
CAST AND TARGET
ATTACK AND TARGET
GAIN FOR CAST
GAIN FOR ATTACK
GAIN FOR CAST AND TARGET
GAIN FOR ATTACK AND TARGET

Mainly I am confused between the difference of regular commands and GAIN FOR commands.

A proper documentation would be really helpful in allowing the community to come together to write rules for custom decks. I would love to put out my decks with these custom rules but I have no idea how any of this works.

Thanks!
Golddieb
#4 Posted : Thursday, December 18, 2014 3:22:34 PM(UTC)

Rank: Advanced Member

Groups: Registered
Posts: 147

Thanks: 39 times
Was thanked: 49 time(s) in 38 post(s)
Haven't used the deckrule language by now so I might be wrong.

My understanding of the rules is the following:

CAST IF
ATTACK IF
CAST AND TARGET
ATTACK AND TARGET
Are used to specify actions the bot performs if (and ONLY IF) the conditions are true.

GAIN FOR CAST
GAIN FOR ATTACK
GAIN FOR CAST AND TARGET
GAIN FOR ATTACK AND TARGET
Are used to specify a value system to evaluate different options.
The higher the gain, the more likely the bot performs this action.
I guess you can also use negative gains to prevent actions.
2 users thanked Golddieb for this useful post.
ragnarok214 on 12/18/2014(UTC), JoyAdmin on 12/18/2014(UTC)
ragnarok214
#5 Posted : Thursday, December 18, 2014 4:11:42 PM(UTC)
Rank: Newbie

Groups: Registered
Posts: 9
Location: Canada

Thanks: 1 times
Golddieb;21672 wrote:
Haven't used the deckrule language by now so I might be wrong.

My understanding of the rules is the following:

CAST IF
ATTACK IF
CAST AND TARGET
ATTACK AND TARGET
Are used to specify actions the bot performs if (and ONLY IF) the conditions are true.

GAIN FOR CAST
GAIN FOR ATTACK
GAIN FOR CAST AND TARGET
GAIN FOR ATTACK AND TARGET
Are used to specify a value system to evaluate different options.
The higher the gain, the more likely the bot performs this action.
I guess you can also use negative gains to prevent actions.


Ah that makes sense. Thank you.
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.071 seconds.