Multiboard Developmental Tool

You can submit your maps here. Both finished and unfinished submissions are welcome.
Forum rules
Finished maps:
• Submitting your own map(s):
One map per topic please! (Or we will have a hard time finding out which comment is for which map)
You can leave your Username@Realm so people can contact you in game. (eg.: 3ICE@USEast, 3ICE@Northrend)
Write a description and don't forget to post some screenshots. (Images and videos are worth a thousand words)
• Submitting a map not made by you:
Do not claim it as yours. We'll find it out (sooner or later) anyway.
Ask the maker to submit it himself is possible.
Or at least let the maker know that his map has a topic here, so he can benefit from your comments and bug reports. (Or request the thread be deleted for whatever reason*.)

Unfinished maps:
You are welcome to post your unfinished maps here and ask for help.
We will look at the map and tell you whats wrong with it or how to continue editing it.

Projects:
Important/cool maps and big projects will have their own forum category inside. (Like the 3ICE's Maze Designer category)
Ian
Posts: 76
Joined: Fri Aug 20, 2010 7:56 pm
Realm: US East
Account: Sesamia
Clan: 3ICE
Location: Minnesota

Multiboard Developmental Tool

Unread post by Ian »

Current Version: 1.01

This is something I've been working on for a few months (it didn't take that long, my motivation for WC3 these days is pretty low). I'm using it to create multiboards for a single player rpg. For anybody doing complex multiboard systems in a map, then this may be useful to you.

*Note: This map is meant to work with a program called GameCaptureX. This also requires JNGP and is intended for people with basic vJASS knowledge.

You can create multiboards in-game. They are fully editable, and you can create a warcraft 3 save and come back to the multiboard later if you need to. Once you are done making your multiboard, you need to launch GameCaptureX and type -compile for code to display. This code is used to setup your multiboard. You only need to copy the code from GameCaptureX and paste it into your desired map. You also need to copy and paste one library into your map, which is specified in this map.

While this map is intended for basic multiboard setup (and generating the code for that), you can use it just for brain storming as well.

To do list for later versions:
-Code compiling for specific sections of the multiboard
-Storage support for multiboard information
-In-game GUI

The version history can be found inside the map.

Example:
Image

Resulting code:

Code: Select all

//=================================================================================
//=================================================================================
//                 Compiled by Multiboard Developmental Tool v1.01                 
//This setup script requres MDT Lib (MultiboardDevelopmentalToolEssentials library)
//                   from the Multiboard Developmental Tool Map.                   
//                          The map can be downloaded at:                          
//                  http://forum.3ice.hu/viewtopic.php?f=7&t=820                   
//=================================================================================
//=================================================================================
library MBNewAgeHeroLineWars initializer onInit uses MultiboardDevelopmentalToolEssentials
 
    globals
        public multiboard Board
        public integer Rows = 12
        public integer Columns = 3
        public string Title
        public integer Title_Red = 92
        public integer Title_Green = 92
        public integer Title_Blue = 190
    endglobals
 
 
    //This function only needs to be run once.  Running it more than once can potentially cause memory leaks.
    //It already runs via a trigger in the onInit function at the bottom of this library.  You can remove the TriggerAddCondition line and run it manually if you need to.
    public function Multiboard_Setup takes nothing returns boolean
        local multiboarditem mb
        set Title = "New Age Hero Line Wars"
        set Board = CreateMultiboard()
        call MultiboardSetRowCount(Board, Rows)
        call MultiboardSetColumnCount(Board, Columns)
        call MultiboardSetTitleText(Board, Title)
        call MultiboardSetTitleTextColor(Board, Title_Red, Title_Green, Title_Blue, 255)
        set mb = MultiboardGetItem(Board,0,0)
        call MultiboardSetItemStyle(mb, false, true)
        call MultiboardSetItemWidth(mb, 0.015)
        call MultiboardSetItemIcon(mb, "ReplaceableTextures\\CommandButtons\\BTNSkillz.blp")
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,1,0)
        call MultiboardSetItemStyle(mb, false, true)
        call MultiboardSetItemWidth(mb, 0.015)
        call MultiboardSetItemIcon(mb, "ReplaceableTextures\\CommandButtons\\BTNSkillz.blp")
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,2,0)
        call MultiboardSetItemStyle(mb, false, true)
        call MultiboardSetItemWidth(mb, 0.015)
        call MultiboardSetItemIcon(mb, "ReplaceableTextures\\CommandButtons\\BTNSkillz.blp")
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,3,0)
        call MultiboardSetItemStyle(mb, false, true)
        call MultiboardSetItemWidth(mb, 0.015)
        call MultiboardSetItemIcon(mb, "ReplaceableTextures\\CommandButtons\\BTNSkillz.blp")
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,4,0)
        call MultiboardSetItemStyle(mb, false, true)
        call MultiboardSetItemWidth(mb, 0.015)
        call MultiboardSetItemIcon(mb, "ReplaceableTextures\\CommandButtons\\BTNSkillz.blp")
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,5,0)
        call MultiboardSetItemStyle(mb, false, true)
        call MultiboardSetItemWidth(mb, 0.015)
        call MultiboardSetItemIcon(mb, "ReplaceableTextures\\CommandButtons\\BTNSkillz.blp")
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,6,0)
        call MultiboardSetItemStyle(mb, false, true)
        call MultiboardSetItemWidth(mb, 0.015)
        call MultiboardSetItemIcon(mb, "ReplaceableTextures\\CommandButtons\\BTNSkillz.blp")
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,7,0)
        call MultiboardSetItemStyle(mb, false, true)
        call MultiboardSetItemWidth(mb, 0.015)
        call MultiboardSetItemIcon(mb, "ReplaceableTextures\\CommandButtons\\BTNSkillz.blp")
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,8,0)
        call MultiboardSetItemStyle(mb, false, true)
        call MultiboardSetItemWidth(mb, 0.015)
        call MultiboardSetItemIcon(mb, "ReplaceableTextures\\CommandButtons\\BTNSkillz.blp")
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,9,0)
        call MultiboardSetItemStyle(mb, false, true)
        call MultiboardSetItemWidth(mb, 0.015)
        call MultiboardSetItemIcon(mb, "ReplaceableTextures\\CommandButtons\\BTNSkillz.blp")
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,10,0)
        call MultiboardSetItemStyle(mb, false, true)
        call MultiboardSetItemWidth(mb, 0.015)
        call MultiboardSetItemIcon(mb, "ReplaceableTextures\\CommandButtons\\BTNSkillz.blp")
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,11,0)
        call MultiboardSetItemStyle(mb, false, true)
        call MultiboardSetItemWidth(mb, 0.015)
        call MultiboardSetItemIcon(mb, "ReplaceableTextures\\CommandButtons\\BTNSkillz.blp")
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,0,1)
        call MultiboardSetItemStyle(mb, true, false)
        call MultiboardSetItemWidth(mb, 0.110)
        call MultiboardSetItemValue(mb, "Forces of Light Lives")
        call MultiboardSetItemValueColor(mb,255,0,0,255)
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,1,1)
        call MultiboardSetItemStyle(mb, true, false)
        call MultiboardSetItemWidth(mb, 0.110)
        call MultiboardSetItemValue(mb, "Forces of Darkness Lives")
        call MultiboardSetItemValueColor(mb,0,0,255,255)
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,2,1)
        call MultiboardSetItemStyle(mb, true, false)
        call MultiboardSetItemWidth(mb, 0.080)
        call MultiboardSetItemValue(mb, "(not playing)")
        call MultiboardSetItemValueColor(mb,0,255,255,255)
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,3,1)
        call MultiboardSetItemStyle(mb, true, false)
        call MultiboardSetItemWidth(mb, 0.080)
        call MultiboardSetItemValue(mb, "(not playing)")
        call MultiboardSetItemValueColor(mb,128,0,192,255)
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,4,1)
        call MultiboardSetItemStyle(mb, true, false)
        call MultiboardSetItemWidth(mb, 0.080)
        call MultiboardSetItemValue(mb, "(not playing)")
        call MultiboardSetItemValueColor(mb,255,255,0,255)
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,5,1)
        call MultiboardSetItemStyle(mb, true, false)
        call MultiboardSetItemWidth(mb, 0.080)
        call MultiboardSetItemValue(mb, "(not playing)")
        call MultiboardSetItemValueColor(mb,255,128,0,255)
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,6,1)
        call MultiboardSetItemStyle(mb, true, false)
        call MultiboardSetItemWidth(mb, 0.080)
        call MultiboardSetItemValue(mb, "(not playing)")
        call MultiboardSetItemValueColor(mb,0,255,0,255)
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,7,1)
        call MultiboardSetItemStyle(mb, true, false)
        call MultiboardSetItemWidth(mb, 0.080)
        call MultiboardSetItemValue(mb, "(not playing)")
        call MultiboardSetItemValueColor(mb,255,128,128,255)
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,8,1)
        call MultiboardSetItemStyle(mb, true, false)
        call MultiboardSetItemWidth(mb, 0.080)
        call MultiboardSetItemValue(mb, "(not playing)")
        call MultiboardSetItemValueColor(mb,192,192,192,255)
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,9,1)
        call MultiboardSetItemStyle(mb, true, false)
        call MultiboardSetItemWidth(mb, 0.080)
        call MultiboardSetItemValue(mb, "(not playing)")
        call MultiboardSetItemValueColor(mb,128,128,255,255)
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,10,1)
        call MultiboardSetItemStyle(mb, true, false)
        call MultiboardSetItemWidth(mb, 0.080)
        call MultiboardSetItemValue(mb, "(not playing)")
        call MultiboardSetItemValueColor(mb,64,128,64,255)
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,11,1)
        call MultiboardSetItemStyle(mb, true, false)
        call MultiboardSetItemWidth(mb, 0.080)
        call MultiboardSetItemValue(mb, "(not playing)")
        call MultiboardSetItemValueColor(mb,128,64,32,255)
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,0,2)
        call MultiboardSetItemStyle(mb, true, false)
        call MultiboardSetItemWidth(mb, 0.015)
        call MultiboardSetItemValue(mb, "150")
        call MultiboardSetItemValueColor(mb,255,0,0,255)
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,1,2)
        call MultiboardSetItemStyle(mb, true, false)
        call MultiboardSetItemWidth(mb, 0.015)
        call MultiboardSetItemValue(mb, "150")
        call MultiboardSetItemValueColor(mb,0,0,255,255)
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,2,2)
        call MultiboardSetItemStyle(mb, true, false)
        call MultiboardSetItemWidth(mb, 0.050)
        call MultiboardSetItemValue(mb, "99999999")
        call MultiboardSetItemValueColor(mb,0,255,255,255)
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,3,2)
        call MultiboardSetItemStyle(mb, true, false)
        call MultiboardSetItemWidth(mb, 0.050)
        call MultiboardSetItemValue(mb, "99999999")
        call MultiboardSetItemValueColor(mb,128,0,192,255)
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,4,2)
        call MultiboardSetItemStyle(mb, true, false)
        call MultiboardSetItemWidth(mb, 0.050)
        call MultiboardSetItemValue(mb, "99999999")
        call MultiboardSetItemValueColor(mb,255,255,0,255)
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,5,2)
        call MultiboardSetItemStyle(mb, true, false)
        call MultiboardSetItemWidth(mb, 0.050)
        call MultiboardSetItemValue(mb, "99999999")
        call MultiboardSetItemValueColor(mb,255,128,0,255)
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,6,2)
        call MultiboardSetItemStyle(mb, true, false)
        call MultiboardSetItemWidth(mb, 0.050)
        call MultiboardSetItemValue(mb, "99999999")
        call MultiboardSetItemValueColor(mb,0,255,0,255)
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,7,2)
        call MultiboardSetItemStyle(mb, true, false)
        call MultiboardSetItemWidth(mb, 0.050)
        call MultiboardSetItemValue(mb, "99999999")
        call MultiboardSetItemValueColor(mb,255,128,128,255)
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,8,2)
        call MultiboardSetItemStyle(mb, true, false)
        call MultiboardSetItemWidth(mb, 0.050)
        call MultiboardSetItemValue(mb, "99999999")
        call MultiboardSetItemValueColor(mb,192,192,192,255)
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,9,2)
        call MultiboardSetItemStyle(mb, true, false)
        call MultiboardSetItemWidth(mb, 0.050)
        call MultiboardSetItemValue(mb, "99999999")
        call MultiboardSetItemValueColor(mb,128,128,255,255)
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,10,2)
        call MultiboardSetItemStyle(mb, true, false)
        call MultiboardSetItemWidth(mb, 0.050)
        call MultiboardSetItemValue(mb, "99999999")
        call MultiboardSetItemValueColor(mb,64,128,64,255)
        call MultiboardReleaseItem(mb)
        set mb = MultiboardGetItem(Board,11,2)
        call MultiboardSetItemStyle(mb, true, false)
        call MultiboardSetItemWidth(mb, 0.050)
        call MultiboardSetItemValue(mb, "99999999")
        call MultiboardSetItemValueColor(mb,128,64,32,255)
        call MultiboardReleaseItem(mb)
        return false
    endfunction
 
 
    private function onInit takes nothing returns nothing
        call TriggerAddCondition(MultiboardDevelopmentalToolEssentials_T,Condition(function Multiboard_Setup))
    endfunction
 
 
endlibrary
Attachments
boardtests.w3x
(110.04 KiB) Downloaded 696 times
Last edited by Ian on Tue Jun 18, 2013 8:09 pm, edited 7 times in total.
ʎɐqə ɯoɹɟ pɹɐoqʎəʞ ɐ ʎnq ı əɯıʇ ʇsɐl əɥʇ sı sıɥʇ


-Currently semi-inactive

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: Multiboard Developmental Tool

Unread post by 3ICE »

Maps that make maps... Pretty damn impressive!

Only problem is the excessive use of the PreserveColor workaround function that makes the generated code unnecessarily CPU intensive.
I'd rather manually run a replace("}", "|") in notepad++ over the copied code than have every player do it every time they play the map.
I'm all for longer "Compile times" if it's in exchange for faster execution.

I wonder what's the limit of GameCaptureX. Should make a map that tests it by spitting out a couple megabytes of code.
ImageImageImageImageImage
Image
ImageImage

Ian
Posts: 76
Joined: Fri Aug 20, 2010 7:56 pm
Realm: US East
Account: Sesamia
Clan: 3ICE
Location: Minnesota

Re: Multiboard Developmental Tool

Unread post by Ian »

I don't know why I didn't think of this before, but I can use if-then-else statements to check if PreserveColor is even needed for each string during the code generation. In my example it's used fairly often, but I wouldn't call that typical by any means unless the user's preference of adding color is through color codes. What really sucks is that I found a nice way to preserve color codes on compile, but the game crashed every time. This is the first workable version, so I'll eventually update it.

The compile time is only long because of that bug that causes Warcraft III to freeze when GameCaptureX is running. I needed to figure out the exact string that caused this, and displaying each string separately did the trick. I've left it in temporarily for debugging purposes, but removing the timer and doing a single function call for Write should be ok (| isn't displayed anymore unless the user uses it). I should be able to display | in-game with GameCaptureX running, but I need to figure out the specifics of the crash. Simply using | in a string does not cause a crash. The user notes used | instead of -, which caused a game crash as well. It seems like string concatenation causes the crash.

Edit:

Kind of off-topic...

Is it possible to make a trigger that allows you to create a trigger in-game, via JASS?
http://forum.3ice.hu/viewtopic.php?f=14&t=805
Maps that make maps... Pretty damn impressive!
Eighteen months ago I started making a dynamic code system that would allow you to do just that. This was dropped due to time constraints, but from it I made a globals access and globals overwrite system that would let you view registered variables in-game and change them. All of this was for debugging, not for making a map while playing a map, but I suppose it would have been possible. If you play my Fighters United 1.0 map, I left a first draft of globals access inside that can be used by red via "call DisplayMemory(ALL)" or "call DisplayMemory(GLOBALVARIABLE[INDEXIFNEEDED])." Fun memories of stuff I've never finished (and most certainly will never finish). Hopefully this developer tool won't fall into that category.
ʎɐqə ɯoɹɟ pɹɐoqʎəʞ ɐ ʎnq ı əɯıʇ ʇsɐl əɥʇ sı sıɥʇ


-Currently semi-inactive

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: Multiboard Developmental Tool

Unread post by 3ICE »

What I meant by "I prefer longer compile times" is letting map makers to do a step in it manually: The fixing of the | characters in color codes.
As opposed to automatically fixing it in the map. Because if you do that, you call PreserveColor a lot of times.
Example: Popular map with 11 players gets hosted 100 times a day.
In just one month you've called PreserveColor on a global scale this many times:
25 * 11 * 100 * 31 = 852 500 (25 calls per multiboard, 11 multiboards (1 for each players) per game, 100 games per day, 31 days per month is a total of 852 500 PreserveColor calls)
Now each PreserveColor call does a great number of operations, because it's a loop:
PreserveColor PreserveColor
function PreserveColor takes string s returns string local integer i= 0 local integer x= StringLength(s) local string n= "" loop exitwhen i == x if SubString(s, i, i + 1) == "}" then set n=n + "|" else set n=n + SubString(s, i, i + 1) endif set i=i + 1 endloop return n endfunction
It creates a great many temporary strings. As many as long the input was.
Your example map uses 271 characters:
Extracted:

Code: Select all

New Age Hero Line Wars vBETA
Forces of Darkness Lives
Forces of Light Lives
WorldEdit
AI }cff00ff00Easy}r
AI }cff00ff00Easy}r
AI }cffff0000Hard}r
Not Playing
AI }cffff0000Hard}r
AI }cff00ff00Easy}r
AI }CFF00FF00Easy}r
AI }cffff0000Hard}r
Not Playing
150
150
1022
682
688
1011
0
990
620
629
989
0
[/span]Normalized and sorted by length:

Code: Select all

____________________________
________________________
_____________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________
___________
___________
_________
____
____
___
___
___
___
___
___
___
___
_
_
[/span]
This means 271 temporary strings, with an average length of 5.42:
Image
So in summary:
Each 25 calls create 271 temporary strings, each 5.42 characters long (averaged).
Each call does a bit of looping, lets say 10 iterations. And then some local variable creating, 2, and of course 2 substring operations per iteration, etc. Let's say 32 operations per call.
Grand total:
852 500 PreserveColor calls.
+
852 500 * 32 = 27 280 000 generic operations.
+
852 500 / 25 * 271 * 5.42 = 1 280 811 temporary strings created, each varying in length.
=
29 413 311 CPU cycles spent.
As opposed to one map maker doing a Search and Replace in his code for 6 manual operations total:
CTRL + H 2 keypresses
} TAB | 3 keypresses
ENTER 1 keypress

Off: Thanks for reminding me of that topic. I just posted a fix.
Attachments
StringTable.png
StringTable.png (3.37 KiB) Viewed 17851 times
ImageImageImageImageImage
Image
ImageImage

Ian
Posts: 76
Joined: Fri Aug 20, 2010 7:56 pm
Realm: US East
Account: Sesamia
Clan: 3ICE
Location: Minnesota

Re: Multiboard Developmental Tool

Unread post by Ian »

Well that certainly does put things in perspective. My goal is to create code for the user without him/her needing to do any manual work. I suppose I could add an option to display the temporary color codes with no preserve color call, but it still goes away from what I want to do. I have no other option but to find the reason for GameCaptureX crashing. I'm certainly not going back to file writing:

Code: Select all

/*-----Please start your copy + paste on this line-----." )
call Preload( ""
    */
library MBYourTitleHere initializer onInit
    /*" )
    call Preload( ""
    */
    //==============================================================================
    /*" )
    call Preload( ""
    */
    globals
    /*" )
        call Preload( ""
    */
        public multiboard Board
    /*" )
        call Preload( ""
    */
        public integer Rows = 1
    /*" )
        call Preload( ""
    */
        public integer Columns = 1
    /*" )
        call Preload( ""
    */
        public string Title = "Your Title Here"
    /*" )
        call Preload( ""
    */
        public integer TitleColor = 16777215
    /*" )
        call Preload( ""
    */
        public boolean array ShowIcon
    /*" )
        call Preload( ""
    */
        public boolean array ShowText
    /*" )
        call Preload( ""
    */
        public string array ItemText
    /*" )
        call Preload( ""
    */
        public string array ItemIcon
    /*" )
        call Preload( ""
    */
        public integer array ItemTextRed
    /*" )
        call Preload( ""
    */
        public integer array ItemTextGreen
    /*" )
        call Preload( ""
    */
        public integer array ItemTextBlue
    /*" )
        call Preload( ""
    */
    endglobals
    /*" )
    call Preload( ""
    */
   
    /*" )
    call Preload( ""
    */
    private function Show_Board takes nothing returns boolean
    /*" )
        call Preload( ""
    */
        return false
    /*" )
        call Preload( ""
    */
    endfunction
    /*" )
    call Preload( ""
    */
    //! textmacro MB_YourTitleHere_initializer
    /*" )
    call Preload( ""
    */
    local trigger t = CreateTrigger()
    /*" )
    call Preload( ""
    */
    call TriggerAddCondition(t,Condition(function Show_Board))
    /*" )
    call Preload( ""
    */
    call TriggerRegisterPlayerChatEvent(t,Player(0),"-show MBYourTitleHere",true)
    /*" )
    call Preload( ""
    */
    //! endtextmacro
    /*" )
    call Preload( ""
    */
   
    /*" )
    call Preload( ""
    */
    //==============================================================================
    /*" )
    call Preload( ""
    */
    private function onInit takes nothing returns nothing
    /*" )
        call Preload( ""
    */
    //! runtextmacro MB_YourTitleHere_initializer()
    /*" )
        call Preload( ""
    */
    endfunction
    /*" )
    call Preload( ""
    */
endlibrary
    /*" )
call Preload( ""
 - - - - - Please end your copy + paste on this line - - - - - .*/
That just turned out awful.

Edit:
As a last resort, something of the following would work:

Code: Select all

constant string MB_COLOR_CODE_CHARACTER = "|"
It could be placed in MDT Lib and copied by the user, and the code generation could use MB_COLOR_CODE_CHARACTER in place of "|".

I also want to note that I want to keep readability over efficiency (but still fairly optimized code), which is why I'm using GameCaptureX instead of file writing. In either case, a 3rd party program is needed (which devastated me, but oh well) to get readability.
Last edited by Ian on Thu Apr 25, 2013 6:19 pm, edited 1 time in total.
ʎɐqə ɯoɹɟ pɹɐoqʎəʞ ɐ ʎnq ı əɯıʇ ʇsɐl əɥʇ sı sıɥʇ


-Currently semi-inactive

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: Multiboard Developmental Tool

Unread post by 3ICE »

File writing is awesome!
You can make it work properly with some extra effort... Or a crafty textmacro.
Sadly I've never abused the Preload functions, just saw the results one can achieve with them. (Writing a virus to file and deploying it in the startup folder.)
ImageImageImageImageImage
Image
ImageImage

Ian
Posts: 76
Joined: Fri Aug 20, 2010 7:56 pm
Realm: US East
Account: Sesamia
Clan: 3ICE
Location: Minnesota

Re: Multiboard Developmental Tool

Unread post by Ian »

A while back I posted a thread on the hive workshop about ways to remove the preload calls. The only person that replied to me basically said that I can't. I don't know very much about the possibilities with the preload function, but it still seems like a 3rd party program is required to remove the commented text from the file. Getting GameCaptureX to not freeze Warcraft III from using | is still the best case scenario for me unless I find a way to use preload without any "call Preload" lines.

Edit:

Thread Here - http://www.hiveworkshop.com/forums/worl ... ii-230866/
ʎɐqə ɯoɹɟ pɹɐoqʎəʞ ɐ ʎnq ı əɯıʇ ʇsɐl əɥʇ sı sıɥʇ


-Currently semi-inactive

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: Multiboard Developmental Tool

Unread post by 3ICE »

That thread was an excellent and enlightening read. Thank you.
I agree, it looks like it can't be done. Preload junk is unavoidably going to be filling in between every line of your system if you go that route. As far as we know, anyway.
ImageImageImageImageImage
Image
ImageImage

Ian
Posts: 76
Joined: Fri Aug 20, 2010 7:56 pm
Realm: US East
Account: Sesamia
Clan: 3ICE
Location: Minnesota

Re: Multiboard Developmental Tool

Unread post by Ian »

How does this look?

Code: Select all

library MultiboardDevelopmentalToolEssentials
    globals
        constant string MDT_CC = "|"//MDT Color Character Variable for GameCaptureX work-around
    endglobals
endlibrary

    public function Multiboard_Setup takes nothing returns nothing
        local multiboarditem mb
        set Title = "" + MDT_CC + "cffff0000Red" + MDT_CC + "r vs. " + MDT_CC + "cff0000ffBlue" + MDT_CC + "r"
        set Board = CreateMultiboard()
        call MultiboardSetRowCount(Board, Rows)
        call MultiboardSetColumnCount(Board, Columns)
        //etc.
ʎɐqə ɯoɹɟ pɹɐoqʎəʞ ɐ ʎnq ı əɯıʇ ʇsɐl əɥʇ sı sıɥʇ


-Currently semi-inactive

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: Multiboard Developmental Tool

Unread post by 3ICE »

Very nice invention, that is much more efficient now. I'll still go though the generated script and manually replace " + MDT_CC + " with | though.

Edit: I like how you started the title with an empty string: "" + MDT_CC + "cff.... My replace method above will work very well with that. (Turns it into "|cff... right away.)
ImageImageImageImageImage
Image
ImageImage

Post Reply

Who is online

Users browsing this forum: No registered users and 127 guests