1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  5. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  6. Units have been turned into heroes in our latest Icon Contest! Vote for the best icon set at the Icon Contest #18 Poll!
    Dismiss Notice
  7. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  8. The raddest synthwave tracks were chosen - Check out our Music Contest #12 - Results and congratulate the winners!
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Dat Alliance System 1.03

Submitted by Dat-C3
This bundle is marked as substandard. It may contain bugs, not perform optimally or otherwise be in violation of the submission rules.
Well I decided to try my hand at one of these and it seems I was quite successful. This should make it easier for anyone/everyone looking for such a system as this. No variables required at all. That's the bonus part, it's honestly better efficiency this way since you don't clog up your variable editor with un-needed names just for a system that doesn't get used often unless someone decides to spam it and even then there should be no lag. [Small Edit: I just tested it and proved that no matter how long and how fast you spam it, you can not lag the game up. You however can annoy yourself.]

Credits to Blizzard, fellow makers of similar systems as this for the encouragement and lastly you for using my system. Thank you, ask any questions you have here if needed.

I know this isn't unique, but I actually don't see one made like mine so in it's own way it is unique.

The Code

Figured that someone would complain otherwise, and well that just isn't right now is it? =)
  • DAS
    • Events
      • Player - Player 1 (Red) types a chat message containing - as A substring
      • Player - Player 2 (Blue) types a chat message containing - as A substring
      • Player - Player 3 (Teal) types a chat message containing - as A substring
      • Player - Player 4 (Purple) types a chat message containing - as A substring
      • Player - Player 5 (Yellow) types a chat message containing - as A substring
      • Player - Player 6 (Orange) types a chat message containing - as A substring
      • Player - Player 7 (Green) types a chat message containing - as A substring
      • Player - Player 8 (Pink) types a chat message containing - as A substring
      • Player - Player 9 (Gray) types a chat message containing - as A substring
      • Player - Player 10 (Light Blue) types a chat message containing - as A substring
      • Player - Player 11 (Dark Green) types a chat message containing - as A substring
      • Player - Player 12 (Brown) types a chat message containing - as A substring
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Substring((Entered chat string), 1, 6)) Equal to -ally
          • (Substring((Entered chat string), 1, 8)) Equal to -unally
          • (Substring((Entered chat string), 1, 5)) Equal to -war
          • (Substring((Entered chat string), 1, 5)) Equal to -info
          • (Substring((Entered chat string), 1, 7)) Equal to -vision
          • (Substring((Entered chat string), 1, 9)) Equal to -unvision
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 1, 10)) Equal to -unvision
          • ((Triggering player) is giving (Player((Integer((Substring((Entered chat string), 11, 11)))))) Shared vision) Equal to True
        • Then - Actions
          • Player - For (Triggering player), turn Shared vision Off toward (Player((Integer((Substring((Entered chat string), 11, 11))))))
          • Game - Display to (Player group((Triggering player))) the text: (You have removed your vision with + (Name of (Player((Integer((Substring((Entered chat string), 11, 11))))))))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Substring((Entered chat string), 1, 8)) Equal to -vision
              • ((Triggering player) is giving (Player((Integer((Substring((Entered chat string), 9, 9)))))) Shared vision) Equal to False
            • Then - Actions
              • Player - For (Triggering player), turn Shared vision On toward (Player((Integer((Substring((Entered chat string), 9, 9))))))
              • Game - Display to (Player group((Triggering player))) the text: (You have shared vision with + (Name of (Player((Integer((Substring((Entered chat string), 9, 9))))))))
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Substring((Entered chat string), 1, 6)) Equal to -ally
                  • ((Triggering player) is an ally of (Player((Integer((Substring((Entered chat string), 7, 7))))))) Equal to False
                • Then - Actions
                  • Player - Make (Triggering player) treat (Player((Integer((Substring((Entered chat string), 7, 7)))))) as an Ally
                  • Game - Display to (All players) the text: ((Name of (Triggering player)) + ( has decided to ally + (Name of (Player((Integer((Substring((Entered chat string), 7, 7)))))))))
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Substring((Entered chat string), 1, 8)) Equal to -unally
                      • ((Triggering player) is an ally of (Player((Integer((Substring((Entered chat string), 9, 9))))))) Equal to True
                      • (Triggering player) Not equal to (Player((Integer((Substring((Entered chat string), 9, 9))))))
                    • Then - Actions
                      • Player - Make (Triggering player) treat (Player((Integer((Substring((Entered chat string), 9, 9)))))) as an Neutral
                      • Game - Display to (All players) the text: ((Name of (Triggering player)) + ( has unallied + (Name of (Player((Integer((Substring((Entered chat string), 9, 9)))))))))
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Substring((Entered chat string), 1, 5)) Equal to -war
                          • ((Triggering player) is an enemy of (Player((Integer((Substring((Entered chat string), 6, 6))))))) Equal to False
                          • (Triggering player) Not equal to (Player((Integer((Substring((Entered chat string), 6, 6))))))
                        • Then - Actions
                          • Player - Make (Triggering player) treat (Player((Integer((Substring((Entered chat string), 6, 6)))))) as an Enemy
                          • Game - Display to (All players) the text: ((Name of (Triggering player)) + ( has declared war on + (Name of (Player((Integer((Substring((Entered chat string), 6, 6)))))))))
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Substring((Entered chat string), 1, 5)) Equal to -info
                            • Then - Actions
                              • Player Group - Pick every player in (All players) and do (Actions)
                                • Loop - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • ((Picked player) slot status) Equal to Is playing
                                    • Then - Actions
                                      • Game - Display to (Player group((Triggering player))) the text: ((Name of (Picked player)) + ('s player number is + ((String((Player number of (Picked player)))) + , so just type -ally,-unally,-war that number to do said command.)))
                                      • Game - Display to (Player group((Triggering player))) the text: Extra commands are ...
                                    • Else - Actions
                            • Else - Actions


I'm pretty sure that nobody needs the JESP/Configurable data for this because if they actually need any help they just have to click a couple times. One trigger, zero variables. I consider that quite awesome really.

Keywords:
a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,And now you know your alphabet!,!,Tal0n,Dat,C3,-,@,#,$,%,^,&,*,(,),1,2,3,4,5,6,7,8,9,0,epic,ca
Contents

DAS Version 3 (Map)

Reviews
Moderator
12th Dec 2015 IcemanBo: For long time as NeedsFix. Rejected. 13:34, 4th Feb 2015 IcemanBo: Needs Fix upon request.
  1. 12th Dec 2015
    IcemanBo: For long time as NeedsFix. Rejected.

    13:34, 4th Feb 2015
    IcemanBo: Needs Fix upon request.
     
  2. gorillabull

    gorillabull

    Joined:
    Jul 17, 2011
    Messages:
    1,368
    Resources:
    2
    Spells:
    2
    Resources:
    2
    whats the point of the initial or block

    skip remaining actions should not be needed in an else block
     
  3. Faith

    Faith

    Joined:
    Dec 29, 2009
    Messages:
    883
    Resources:
    3
    Spells:
    1
    Tutorials:
    2
    Resources:
    3
    What's the benefit of using this over mine? http://www.hiveworkshop.com/forums/spells-569/alliance-handler-v1-3-a-261543/

    Also the configuration is typically a requirement.
    As for your system, the variables are added to make it more efficient, not less efficient.
    This is basically the exact same thing as mine, except you made the player being allied, add an alliance to whoever is allying them.

    You also missed a condition to check to ensure that you can't ally/unally yourself.
     
    Last edited: Jan 20, 2015
  4. gorillabull

    gorillabull

    Joined:
    Jul 17, 2011
    Messages:
    1,368
    Resources:
    2
    Spells:
    2
    Resources:
    2
    maybe he copied your code
     
  5. Faith

    Faith

    Joined:
    Dec 29, 2009
    Messages:
    883
    Resources:
    3
    Spells:
    1
    Tutorials:
    2
    Resources:
    3
    Looks pretty similar, doesn't it? But I mean if he can make it better than mine, more power to him. As it stands, there's no benefit to using this.
     
  6. Dat-C3

    Dat-C3

    Joined:
    Mar 15, 2012
    Messages:
    2,470
    Resources:
    10
    Models:
    1
    Maps:
    5
    Spells:
    3
    Tutorials:
    1
    Resources:
    10
    Forgot to remove those, was testing something. Will update soon.

    Does it seriously look copied?

    The benefit is that yours requires three triggers and a lot of variables, yeah usually it is a requirement. The old days of GUI were sure funny though. Variables aren't required or even needed for such a system as this because it just makes the entire map slower with adding un-necessary extra data. Function calls are okay because this is a system that can't be slow anyways. I do not see how this is the exact same thing as yours.

    Who would ally/unally themselves? I'll add that when I update I guess.
    Edit: No matter what you can't ally yourself with that condition in place, however you can still unally/war yourself.
    I was actually going to submit this last year, but I never got to it so as it stands it never even was inspired by yours or even made similar. There is a gigantic benefit though and that is that you can just copy and paste it and for once expect it to be perfectly working.

    Good work on yours, but I haven't seen a system that has done this yet on here so I decided to submit one that does. I didn't see yours until recently.
     
    Last edited: Jan 20, 2015
  7. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,181
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    You don't really need to economize with "extra variables" in my opinion. You can gain readability, performance, and it's easier to change 1 variable at a known position, instead of 5 constants spreaded in code.
     
  8. Dat-C3

    Dat-C3

    Joined:
    Mar 15, 2012
    Messages:
    2,470
    Resources:
    10
    Models:
    1
    Maps:
    5
    Spells:
    3
    Tutorials:
    1
    Resources:
    10
    There is nothing to gain from readability or even performance. It's a simple system, the only thing that people might change is the text that gets said when you ally/war/unally someone. Still, not worth it to sacrifice file size and variable size.
     
  9. chobibo

    chobibo

    Joined:
    Sep 24, 2005
    Messages:
    2,692
    Resources:
    0
    Resources:
    0
    EDIT: Don't worry, this isn't written in jass so it doesn't need to follow the JESP manifesto.
     
  10. edo494

    edo494

    Joined:
    Apr 16, 2012
    Messages:
    3,855
    Resources:
    5
    Spells:
    1
    JASS:
    4
    Resources:
    5
    sorry but I have to say that this is a flawed system, not in code base, but logically.

    When I type -ally XX, then I automatically become ally with XX with shared vision, and he becomes my ally. This is extreme flaw in this system, because you could spoof players with this.

    You should instead make it so that when I type -ally XX, the other player either has to type -ally My_name/color/whatever or -accept or something, and until they type this noone shares vision(so he cant see my units, and neither can I see his), and only after he accepted my ally request make our visions shared, or make it even configurable(not everyone wants to have shared vision in their map)
     
  11. Dat-C3

    Dat-C3

    Joined:
    Mar 15, 2012
    Messages:
    2,470
    Resources:
    10
    Models:
    1
    Maps:
    5
    Spells:
    3
    Tutorials:
    1
    Resources:
    10
    Thanks, I have considered your opinion and edited my system.
     
  12. Faith

    Faith

    Joined:
    Dec 29, 2009
    Messages:
    883
    Resources:
    3
    Spells:
    1
    Tutorials:
    2
    Resources:
    3
    Now that you took that part out, your system is exactly like mine, it's harder to edit, it lacks features mine has, and it's slower.

    The variables aren't there to hurt the system, it makes it faster.
    Variables don't even take up that much space, and you can't easily edit anything with your system because of the lack of configuration options.
     
  13. Dat-C3

    Dat-C3

    Joined:
    Mar 15, 2012
    Messages:
    2,470
    Resources:
    10
    Models:
    1
    Maps:
    5
    Spells:
    3
    Tutorials:
    1
    Resources:
    10
    Not exactly, mine offers a tutorial. Harder to edit? Only one thing in every if block can be edited anyways. Yours is actually slower because you force it to loop. :grin:
    It's easier typing -ally 1 then -ally red's name or -ally red.

    Though I will likely just remake this because I am starting to really dislike all those function calls and some more features require at least one variable. A habit I grew into when I became really good at mapmaking. I don't know though, will have to test spamming with loops first I guess.
    Edit: Maybe I can offer two versions, beginner and normal versions. =)
     
    Last edited: Jan 20, 2015
  14. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,193
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    You are leaking player groups.
     
  15. Wrda

    Wrda

    Joined:
    Nov 18, 2012
    Messages:
    1,090
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    You forgot something:
    • (Player((Integer((Substring((Entered chat string), 11, 11))))))

    ->
    • (Player((Integer((Substring((Entered chat string), 11, 12))))))

    Always add +1 at end else we cant ally players 10, 11 and 12. (2 digits).

    @Faith: I totally agree with Dat-C3, this is not a loop so it won't be slow, and it won't be diferent with just more thousands of variables.
     
  16. Faith

    Faith

    Joined:
    Dec 29, 2009
    Messages:
    883
    Resources:
    3
    Spells:
    1
    Tutorials:
    2
    Resources:
    3
    https://www.hiveworkshop.com/posts/2640737/

    No loops. :vw_death:
    Variables also make it faster. Not using them slows it down when a function call is repeated several times like in our systems.
    There really isn't a good reason to NOT have variables. They make everyone's lives easier.
     
  17. Dat-C3

    Dat-C3

    Joined:
    Mar 15, 2012
    Messages:
    2,470
    Resources:
    10
    Models:
    1
    Maps:
    5
    Spells:
    3
    Tutorials:
    1
    Resources:
    10
    Odd I remember seeing loops besides at the start/config... My bad.
     
  18. Faith

    Faith

    Joined:
    Dec 29, 2009
    Messages:
    883
    Resources:
    3
    Spells:
    1
    Tutorials:
    2
    Resources:
    3
    The very first version included a loop. You weren't wrong about that. But now I'm 5 versions in. :smile:

    Also I'm not trying to hate on your system, there just isn't any benefit to using it. Add something I don't have in mine.