• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Warcraft III: Community Edition

Warcraft III: Community Edition is a launcher designed specifically for Warcraft III, version 1.29.2.9231, nothing more, nothing less. The goal is to make a stable modding platform compatible with retail. A platform where we can add our own carefully considered features and thrive.

Alpha Version​

This is an alpha version of the launcher and will have a lot of issues. The point of this alpha release is to gather feedback on what needs fixing.

Please report any issues you encounter directly in this thread, or on our GitHub repo.

Installation Guide​

  1. Download 1.29.2 from here.
  2. Download Warcraft III: Community Edition and unzip it to a separate folder, not into the Warcraft III folder.
  3. Make sure you have the dependencies listed below.
  4. Make sure you have your CD-keys ready for both Reign of Chaos and The Frozen Throne.
  5. Run W3CE.Launcher and follow the on-screen instructions.

Dependencies​

Features​

  • Support for loading maps up to version 1.36.
  • Support for most natives introduced up to version 1.36.
  • Support for loading maps written in Lua.
  • Support for compiling map scripts with WASM.
  • Support for loading SD models up format version 1100.
  • A server to play with friends on.

Making your own maps​

We do not ship a custom World Editor with W3CE, so you are free to work on your maps in whatever editor you like (including the Reforged World Editor). In order for you to use our custom natives from JASS, you will have to enable local files and overwrite the common.j with our custom one.
  1. Enable local files
  2. Download W3CE's common.j
  3. Place the common.j in your <Warcraft III Installation Folder>/_retail_/scripts folder.

Known Issues​

  • New abilities introduced since 1.29.2 (Sundering Blades, Prioritize, etc) are currently not supported, but will only silently fail with a log message.
  • Many HD assets will be missing (pic related), but we do forward the ones we can to SD.
  • The frame API is still being worked on and needs some edge cases ironed out.

Planned Features​

  • Server stored characters and progress.
  • Reconnect and joining games in progress.
  • Map signing and author verification.
  • Tools to aid map developers in debugging desyncs.

Frequently Asked Questions (FAQ)​

  • What if I don't have CD Keys?
    • We plan on adding support for players who have purchased Reforged but do not own any CD keys.

How can I help?​

Right now the thing we need the most is testers to try out their favorite maps, to see where our efforts should be focused.
Feedback in this tool thread and in the #w3ce channel on our Discord server is warmly welcomed.

Credits and Acknowledgements​

W3CE builds on decades of knowledge gathered across many communities and wouldn't have been possible without everyone involved now and in the past.

Changelog​

  • Added an alternate CE version of the object instance API which is 1 indexed and doesn't exhibit any bugged behavior.
  • BlzSetUnitWeaponRealField now matches the bugged behavior of Reforged.
  • Fixed an issue where maps with UTF8 characters in their trigger string file would not display properly.
  • Fixed a crash that could occur after playing a second map.
  • Fixed a crash that could occur randomly after playing multiple maps.
  • Fixed a crash that would occur when importing a 0kb terrain tile texture.
  • Fixed a crash that would occur when assigning frame's parent to a simpleframe.
  • WASM is now a supported scripting environment, allowing developers to code their maps in a variety of different languages such as Rust, C++, Go, Java, and so on.
  • Significantly improved map loading times.
  • Blizzard natives are now zero indexed in order to match Reforged's behavior.
  • Added 14 new origin frame types.
  • Added 24 new frame natives.
  • Added 10 new input natives.
  • Added CeGetAbilityLevel which allows you get the current level of an ability or buff object
  • BlzSetItemName, BlzSetItemDescription, and BlzSetItemIconPath are now working properly.
  • Implemented the item instance natives.
  • Implemented the majority of the unit instance natives.
  • Implemented the majority of the ability instance natives.
  • BlzFrameGetText now works for SimpleStrings.
  • BlzFrameSetTooltip now works for SimpleButtons.
  • BlzFrameGetByName now works with many different origin frames.
  • EditBox frames now have functioning events.
  • Fixed an issue where health bars would appear over the UI.
  • Fixed an issue where the texture cache was not working, causing maps to stutter.
  • Fixed an issue where FrameGetTextValue could cause a crash.
  • Fixed an issue where using strings longer than 1024 characters could cause a crash.
  • Fixed an issue where BlzEnableCursor could cause a crash.
  • Fixed an issue where TFT maps that used Reforged doodad data would crash.
  • Fixed an issue where BlzSetItemSkin would cause items to be invisible.
  • Fixed an issue where some frame events would trigger in reverse.
  • Fixed an issue where DXT1 textures did not support transparency.
  • Fixed an issue where textures with no mipmaps could fail to load.
  • Fixed an issue where keyboard events only fired for one player.
  • Fixed an issue where sync events would not take the sync prefix into account.
  • Fixed an issue where TriggerSleepAction would crash Lua maps.
Changes

Adds support for loading more texture formats (bmp, png, tif, dds, ktx, ktx2).
Improved asset loader to look into common retail paths.
Implemented multiple retail natives.
Improved retail parity in special effect natives.
Expanded W3CE API, adds many new natives related to updating models and their textures on units, items, effects, etc.

Fixes

Fixes Lua issue with equality and nil values.
Changes

Adds automatic UPnP port forwarding to help with Battle.net hosting.
Improves Lua FourCC and print.
Adds support for --verbose command line, to get more detailed logging.
Adds support for UNIT_RF_FLY_HEIGHT.
Adds support for GetUnitZ.

Fixes

Broken Lua dependencies.
Broken Lua common.j event ids.
Crash related to chain lightning from bugged damage events.

Changes​

  • Adds support for loading Reforged maps (1.31 through 1.35)
  • Adds Lua scripting engine.
  • Adds support for MDX version 1100.
  • Adds most critical natives have been implemented (185/242).
    • Some remaining ones are non-functional like dialogue/FaceFX control.
  • Adds partial support for the skin system (war3mapSkin.w3* files).
  • Adds the ability to load textures without specifying an extension.
  • Adds support for all of the updated file formats.
  • Adds support for loading maps created with DzAPI and YDAPI (NetEase).
  • The game can now use up to 3.5GB of RAM compared to the default 2GB.
  • The game is no longer limited to 64fps.
  • Adds support for connecting to our custom Battle.net server.
  • Adds 20 new natives.

Fixes​

  • Displaying a TimerDialog and Multiboad at the same time is no longer broken
  • BlzIsUnitInvulnerable no longer returns false if a unit is invulnerable

Libraries​

Previews
Contents

W3CE-v0.2.1-alpha (Binary)

Reviews
Ralle
One large step for a couple men, one big step for a community.

Ralle

Owner
Level 77
Joined
Oct 6, 2004
Messages
10,098
i tried hosting the game,
and others player can't join,
I try using port forwarding using this tutorial,
because my internet using usb tethering from mobile,
so i dont know how to set the port as you mention
so here, the tutorial


this is the guide that i following,
is my porting is working?
or there is any other way to port to 6112 because i dont use any router right now

i have did according this guide, but still my friend cant join
I think this will not work with regular port forwarding. Hamachi or similar is probably your only hope. Or maybe a VPN.
 
Level 4
Joined
Jul 9, 2012
Messages
54
Tested this. And got lower ping than Bnet servers. /ping /fps /apm works... I wonder what other in-game commands are. I'm from Asia btw, got 55ms ping (played with no one else) and at lobby latency 457
 
Level 6
Joined
Sep 3, 2020
Messages
17
functions do not work:
BlzSetAbilityTooltip
BlzSetAbilityExtendedTooltip
BlzStartUnitAbilityCooldown
It is written about nativok up to 1.35, but here are 3 of the basic ones that I used before do not work
BlzGetFrameByName("InfoPanelIconValue",0) is return nil value now, BLZ don't work?
Maybe it doesn't work either?
I can't see the results of the print function in Cyrillic for 1.29 patch and most likely the TOC BlzLoadTOCFile reading function doesn't work
The map I'm checking is made at about 1.32.6
Am I doing something wrong? or is everything really so in ALPHA state?
 
Level 18
Joined
Jan 12, 2011
Messages
1,512
functions do not work:

It is written about nativok up to 1.35, but here are 3 of the basic ones that I used before do not work

Maybe it doesn't work either?
I can't see the results of the print function in Cyrillic for 1.29 patch and most likely the TOC BlzLoadTOCFile reading function doesn't work
The map I'm checking is made at about 1.32.6
Am I doing something wrong? or is everything really so in ALPHA state?
yes it's alpha and only meant to test certain stuff, 0.1.1 is just the first release with a hotfix applied
 
Level 4
Joined
Jul 9, 2012
Messages
54
I can't register BattlenetTag type usernames to wce pvpgn bnet registration like in eurobattle.net pvpgn & entgaming.net. But I think since reforged no cdkey installation is planned maybe allowing # in username is already planned as well?

Also, Daemonic sword orpg just stuck to 90% loading - I really liked to play on this warcraft 3 version since Reforged is slow loading & too heavy on resources.
 
Last edited:
Level 1
Joined
Oct 17, 2021
Messages
2
Great Stuff
i'll try out my Fav maps soon

PS: the linked archive for 1.29.2 is Damaged when i DL it (tried 2 times).
PSS: The MEGA link in this Post workes for me thoug Here
 

MindWorX

Tool Moderator
Level 20
Joined
Aug 3, 2004
Messages
709
Updated to alpha version 0.1.2
Changes

Adds support for loading more texture formats (bmp, png, tif, dds, ktx, ktx2).
Improved asset loader to look into common retail paths.
Implemented multiple retail natives.
Improved retail parity in special effect natives.
Expanded W3CE API, adds many new natives related to updating models and their textures on units, items, effects, etc.

Fixes

Fixes Lua issue with equality and nil values.
 
Here's a quick overview on the newly implemented Model API. With these natives you can manipulate anything that has a model. For now, this includes frames, widgets, and effects but we also plan to add more types in the future (Missile API?).

The primary reason for us wanting to create this was that we have no way to control models via the Frame API in Reforged (rotate, scale, attachments etc..), however we expanded it to work with basically everything. You can even add attachments to special effects :D

JASS:
type war3image          extends     agent // all game objects with a model (added by W3CE)
type widget             extends     war3image  // an interactive game object with life
type unit               extends     widget  // a single unit reference
type destructable       extends     widget
type item               extends     widget

// Frame API
native CeGetFrameModel                          takes framehandle whichFrame returns modelhandle

// War3Image API
native CeSetWar3ImageModelPath                  takes war3image whichImage, string modelPath returns nothing
native CeSetWar3ImageTexturePath                takes war3image whichImage, string texturePath, integer textureId returns nothing
native CeGetWar3ImageModel                      takes war3image whichImage returns modelhandle

// Model API
native CeSetModelPitch                          takes modelhandle whichModel, real pitch returns nothing
native CeSetModelRoll                           takes modelhandle whichModel, real roll returns nothing
native CeSetModelYaw                            takes modelhandle whichModel, real yaw returns nothing
native CeSetModelOrientation                    takes modelhandle whichModel, real yaw, real pitch, real roll returns nothing
native CeSetModelScale                          takes modelhandle whichModel, real scale returns nothing
native CeSetModelTime                           takes modelhandle whichModel, real time returns nothing
native CeSetModelTimeScale                      takes modelhandle whichModel, real timeScale returns nothing
native CeSetModelHeight                         takes modelhandle whichModel, real height returns nothing
native CeSetModelX                              takes modelhandle whichModel, real x returns nothing
native CeSetModelY                              takes modelhandle whichModel, real y returns nothing
native CeSetModelZ                              takes modelhandle whichModel, real z returns nothing
native CeSetModelPosition                       takes modelhandle whichModel, real x, real y, real z returns nothing
native CeSetModelAlpha                          takes modelhandle whichModel, integer alpha returns nothing
native CeSetModelColor                          takes modelhandle whichModel, integer r, integer g, integer b returns nothing
native CeSetModelColorByPlayer                  takes modelhandle whichModel, player whichPlayer returns nothing
native CeSetModelTexturePath                    takes modelhandle whichModel, string texturePath, integer textureId returns nothing
native CeGetModelTexturePath                    takes modelhandle whichModel, integer textureId returns string
native CeGetModelTextureCount                   takes modelhandle whichModel returns integer
native CeSetModelAnimation                      takes modelhandle whichModel, string whichAnimation returns nothing
native CeSetModelAnimationEx                    takes modelhandle whichModel, integer primaryProp, integer flags returns nothing
native CeSetModelAnimationByIndex               takes modelhandle whichModel, integer whichIndex returns nothing
native CeSetModelAnimationWithRarity            takes modelhandle whichModel, string whichAnimation, raritycontrol rarity returns nothing
native CeQueueModelAnimation                    takes modelhandle whichModel, string whichAnimation returns nothing
native CeAddModelAttachment                     takes modelhandle whichModel, string modelPath, string attachPointName returns modelhandle
native CeSetModelAttachment                     takes modelhandle whichModel, modelhandle attachModel, string attachPointName returns nothing
native CeSetModelPath                           takes modelhandle whichSprite, string modelPath returns nothing
native CeGetModelHeight                         takes modelhandle whichModel returns real // async!
native CeGetModelX                              takes modelhandle whichModel returns real // async!
native CeGetModelY                              takes modelhandle whichModel returns real // async!
native CeGetModelZ                              takes modelhandle whichModel returns real // async!
 

MindWorX

Tool Moderator
Level 20
Joined
Aug 3, 2004
Messages
709
How to access these interesting APIs for modders?
For the time being, your best bet is to use WEX and import the attached file. Alternatively, if you want to use the retail editor, you'll have to use Lua, as the retail editor unfortunately will complain about the new natives. It's a gap we'll need to bridge at some point, but it's problematic since we currently don't have any plans to reverse engineer the retail editor, as it is heavily obfuscated.
 

Attachments

  • common.j
    359.8 KB · Views: 5
For the time being, your best bet is to use WEX and import the attached file. Alternatively, if you want to use the retail editor, you'll have to use Lua, as the retail editor unfortunately will complain about the new natives. It's a gap we'll need to bridge at some point, but it's problematic since we currently don't have any plans to reverse engineer the retail editor, as it is heavily obfuscated.
So, I have to install SharpCraft World Editor Extended Bundle and ... where is the attached file?
 
Is there a way to detect Community Edition patch is being played on or not and at the same time render the map playable on at least Reforged (akin to GetGamePatch)? Probably custom string or something.

EDIT:
Also, is there a way to record with OBS? Game Record doesn't detect the Patched exe.

EDIT 2:
Windows Capture seems to solve it.
 
Last edited:
So, if a map that is made with patch above 1.29 (in my case, Reforged) is selected by default (like for example last game run before warcraft exited) and then run without selecting other maps first, it causes the game to crash during load without any error.

[20:58:23 INF ] launcherDirectory: D:\Warcraft III Classic\W3CE-v0.1.2-alpha\
[20:58:23 INF ] Module: 00DA0000
[20:58:23 INF ] Version: 1.29.2.9231
[20:58:23 INF NatPuncher] Searching for NAT devices...
[20:58:24 WRN ForceFrozenThrone] Preferred Game Version forced to The Frozen Throne.
[20:58:35 WRN LuaEngine] Using modified Scripts/common.j.lua.
[20:58:35 WRN LuaEngine] Using modified Scripts/Blizzard.j.lua.
[20:58:38 WRN LuaEngine] Using modified Scripts/common.j.lua.
[20:58:38 WRN LuaEngine] Using modified Scripts/Blizzard.j.lua.
 
Level 2
Joined
Jun 3, 2023
Messages
8
Hi, do you think it'd be possible to update the way the server works so that it doesn't block new instances? I'm currently running CE in combination with NucleusCoop to try out some co-op custom maps and while everything works fine and dandy, since I'm effectively running two instances of the server one of them gets cut out from the network (which doesn't happen if I run the unpatched game). Besides that, I want to thank and congratulate all of the people involved in this project, you're truly doing god's work and showcase the importance of not only having an archive for map versions, but also adding backwards compatibility support through the new natives as a plug-in
 
Level 1
Joined
Jun 25, 2023
Messages
1
The best thing since sliced bread. Also how is this better than reforged??? Btw i have created this account just to leave my perfect score here. Amazing Job!!!
 
Level 4
Joined
Jul 9, 2012
Messages
54
Is it possible to also have Frames Per Second unlock limit >60 in this version?
 
Last edited:
Level 4
Joined
Jul 9, 2012
Messages
54
Hi, do you think it'd be possible to update the way the server works so that it doesn't block new instances? I'm currently running CE in combination with NucleusCoop to try out some co-op custom maps and while everything works fine and dandy, since I'm effectively running two instances of the server one of them gets cut out from the network (which doesn't happen if I run the unpatched game). Besides that, I want to thank and congratulate all of the people involved in this project, you're truly doing god's work and showcase the importance of not only having an archive for map versions, but also adding backwards compatibility support through the new natives as a plug-in
What settings for NucleusCoop? I have trouble having to control using the mouse since cursor feels offset.
 
Level 2
Joined
Jun 3, 2023
Messages
8
What settings for NucleusCoop? I have trouble having to control using the mouse since cursor feels offset.
Sorry for late reply. Unfortunately that's on the game itself. Mouse offsetting wasn't an issue if you used the widescreen patch for 1.27 until widescreen resolutions were added to the game natively. I tried everything I could on my end to find a solution but nothing works as I'd want to, you either wrap the exe window (using DxWnd for example, not recommended as that breaks Nucleus' own wrapping method) or stick to 1.27 for co-op shenanigans. The problem seems to be tied to window height apparently, as non-standard resolutions will cause the offsetting in the first place until 1.30+ (since those versions remove the ability to resize window and custom resolutions don't work anymore on them), but so far there's absolutely no fix available for it
 
Level 5
Joined
Jun 18, 2021
Messages
39
Basically, this is good ol' Warcraft 3 without having to mettle with Battle.Net, let alone the absolute fuckery that is Reforged...And you are also able to play most if not all maps made in the Reforged versions?

I'm all in, cheers :peasant-cheers-back:
 
Big update.

Thanks to @~El for implementing WASM, and to @Tasyen for helping out with the frame and object instance APIs.

v0.2.0-alpha​

  • WASM is now a supported scripting environment, allowing developers to code their maps in a variety of different languages such as Rust, C++, Go, Java, and so on.
  • Significantly improved map loading times.
  • Blizzard natives are now zero indexed in order to match Reforged's behavior.
  • Added 14 new origin frame types.
  • Added 24 new frame natives.
  • Added 10 new input natives.
  • Added CeGetAbilityLevel which allows you get the current level of an ability or buff object
  • BlzSetItemName, BlzSetItemDescription, and BlzSetItemIconPath are now working properly.
  • Implemented the item instance natives.
  • Implemented the majority of the unit instance natives.
  • Implemented the majority of the ability instance natives.
  • BlzFrameGetText now works for SimpleStrings.
  • BlzFrameSetTooltip now works for SimpleButtons.
  • BlzFrameGetByName now works with many different origin frames.
  • EditBox frames now have functioning events.
  • Fixed an issue where health bars would appear over the UI.
  • Fixed an issue where the texture cache was not working, causing maps to stutter.
  • Fixed an issue where FrameGetTextValue could cause a crash.
  • Fixed an issue where using strings longer than 1024 characters could cause a crash.
  • Fixed an issue where BlzEnableCursor could cause a crash.
  • Fixed an issue where TFT maps that used Reforged doodad data would crash.
  • Fixed an issue where BlzSetItemSkin would cause items to be invisible.
  • Fixed an issue where some frame events would trigger in reverse.
  • Fixed an issue where DXT1 textures did not support transparency.
  • Fixed an issue where textures with no mipmaps could fail to load.
  • Fixed an issue where keyboard events only fired for one player.
  • Fixed an issue where sync events would not take the sync prefix into account.
  • Fixed an issue where TriggerSleepAction would crash Lua maps.
 
Last edited:
There are some exciting new features in this latest update, so I'm going to use this post to shed some light on the most notable changes.

WASM

W3CE now supports WebAssembly, which in short allows developers to work on their maps in a variety of different programming languages. In theory, you can use almost any language which targets WASM (and there are many). For a more detailed writeup you can check the following page:


As well as a premade template configuration for Rust which you can find here:


C-like:
unsafe extern "C" fn main() {
    spawn(async {
        let p_name = native::get_player_name(&p);
        let cstring = std::ffi::CString::new(p_name).expect("invalid player name");
        native::display_text_to_player(&p, 0., 0., &cstring);

        info!("p: {}", p_name);
    });
}

Input Natives​

In addition to the async mouse natives which were implemented in the last update, we added the InputMode and MouseState APIs which further allow you to view and modify elements of the mouse.

For example, have you ever wanted to implement a drag and drop system for your UI? What about detecting what point/target ability is about to be cast? Now you can without any hassle.

Code:
call CeSetMouseState(MOUSE_STATE_HOLD_ITEM, "ReplaceableTextures\\CommandButtons\\BTNHeroPaladin.blp")

1703388155798.png


You can take a look at the full API below.

Code:
//===================================================
// Input Mode constants
//===================================================

    constant inputmode INPUT_MODE_NONE          = ConvertInputMode(0)
    constant inputmode INPUT_MODE_SELECT        = ConvertInputMode(1)
    constant inputmode INPUT_MODE_TARGET        = ConvertInputMode(2)
    constant inputmode INPUT_MODE_BUILD         = ConvertInputMode(3)
    constant inputmode INPUT_MODE_DRAG_SCROLL   = ConvertInputMode(4)
    constant inputmode INPUT_MODE_DRAG_SELECT   = ConvertInputMode(5)
    constant inputmode INPUT_MODE_SIGNAL        = ConvertInputMode(6)
    constant inputmode INPUT_MODE_ESC_MENU      = ConvertInputMode(7)
    constant inputmode INPUT_MODE_CHAT          = ConvertInputMode(8)
    constant inputmode INPUT_MODE_ALLIANCE      = ConvertInputMode(9)
    constant inputmode INPUT_MODE_QUEST         = ConvertInputMode(10)
    constant inputmode INPUT_MODE_SCRIPT_DIALOG = ConvertInputMode(11)
    constant inputmode INPUT_MODE_SUSPEND       = ConvertInputMode(12)
    constant inputmode INPUT_MODE_UNRESOONSIVE  = ConvertInputMode(13)
    constant inputmode INPUT_MODE_GAMEOVER      = ConvertInputMode(14)

//===================================================
// Mouse State constants
//===================================================

    constant mousestate MOUSE_STATE_NONE                = ConvertMouseState(0)
    constant mousestate MOUSE_STATE_NEUTRAL             = ConvertMouseState(1)
    constant mousestate MOUSE_STATE_ENEMY               = ConvertMouseState(2)
    constant mousestate MOUSE_STATE_ALLY                = ConvertMouseState(3)
    constant mousestate MOUSE_STATE_TARGET_NONE         = ConvertMouseState(4)
    constant mousestate MOUSE_STATE_TARGET_NEUTRAL      = ConvertMouseState(5)
    constant mousestate MOUSE_STATE_TARGET_ENEMY        = ConvertMouseState(6)
    constant mousestate MOUSE_STATE_TARGET_ALLY         = ConvertMouseState(7)
    constant mousestate MOUSE_STATE_HOLD_ITEM           = ConvertMouseState(9)
    constant mousestate MOUSE_STATE_PAN_LEFT            = ConvertMouseState(10)
    constant mousestate MOUSE_STATE_PAN_RIGHT           = ConvertMouseState(11)
    constant mousestate MOUSE_STATE_PAN_UP              = ConvertMouseState(12)
    constant mousestate MOUSE_STATE_PAN_DOWN            = ConvertMouseState(13)
    constant mousestate MOUSE_STATE_PAN_TOP_LEFT        = ConvertMouseState(14)
    constant mousestate MOUSE_STATE_PAN_TOP_RIGHT       = ConvertMouseState(15)
    constant mousestate MOUSE_STATE_PAN_BOTTOM_LEFT     = ConvertMouseState(16)
    constant mousestate MOUSE_STATE_PAN_BOTTOM_RIGHT    = ConvertMouseState(17)

// Input API (async only!)
native CeIsKeyDown                              takes oskeytype key returns boolean
native CeIsMouseButtonDown                      takes mousebuttontype button returns boolean
native CeGetMouseX                              takes nothing returns integer
native CeGetMouseY                              takes nothing returns integer
native CeGetMouseRelativeX                      takes nothing returns integer
native CeGetMouseRelativeY                      takes nothing returns integer
native CeGetMouseHoveredUnit                    takes nothing returns unit
native CeGetMouseTargetedUnit                   takes nothing returns unit
native CeGetMouseHoveredItem                    takes nothing returns item
native CeGetMouseTargetedItem                   takes nothing returns item
native CeGetMouseHoveredDestructable            takes nothing returns destructable
native CeGetMouseTargetedDestructable           takes nothing returns destructable
native CeGetMouseState                          takes nothing returns mousestate
native CeSetMouseState                          takes mousestate whichState, string iconPath returns nothing

// CInputMode - All input modes are local/async.
native CeGetCurrentInputMode                    takes nothing returns inputmode

// CBuildMode
native CeGetBuildModeUnitTypeId                 takes nothing returns integer
native CeGetBuildModeAbilityId                  takes nothing returns integer
native CeGetBuildModeTerrainX                   takes nothing returns real
native CeGetBuildModeTerrainY                   takes nothing returns real
native CeGetBuildModeTerrainZ                   takes nothing returns real

// CTargetMode
native CeGetTargetModeTargetedUnit              takes nothing returns unit
native CeGetTargetModeTargetedItem              takes nothing returns item
native CeGetTargetModeAbilityId                 takes nothing returns integer
native CeGetTargetModeOrderId                   takes nothing returns integer

Frames​

There were many improvements to the frame natives in this release, including new features and bug fixes. You should expect your Reforged maps that take advantage of frames to be much more accurate than before.

You can take a look at the full W3CE frame API (not including the Blz natives, which are also implemented) below:

Code:
//===================================================
// Custom UI API constants
//===================================================

    constant originframetype        ORIGIN_FRAME_GAME_UI                    = ConvertOriginFrameType(0)
    constant originframetype        ORIGIN_FRAME_COMMAND_BUTTON             = ConvertOriginFrameType(1)
    constant originframetype        ORIGIN_FRAME_HERO_BAR                   = ConvertOriginFrameType(2)
    constant originframetype        ORIGIN_FRAME_HERO_BUTTON                = ConvertOriginFrameType(3)
    constant originframetype        ORIGIN_FRAME_HERO_HP_BAR                = ConvertOriginFrameType(4)
    constant originframetype        ORIGIN_FRAME_HERO_MANA_BAR              = ConvertOriginFrameType(5)
    constant originframetype        ORIGIN_FRAME_HERO_BUTTON_INDICATOR      = ConvertOriginFrameType(6)
    constant originframetype        ORIGIN_FRAME_ITEM_BUTTON                = ConvertOriginFrameType(7)
    constant originframetype        ORIGIN_FRAME_MINIMAP                    = ConvertOriginFrameType(8)
    constant originframetype        ORIGIN_FRAME_MINIMAP_BUTTON             = ConvertOriginFrameType(9)
    constant originframetype        ORIGIN_FRAME_SYSTEM_BUTTON              = ConvertOriginFrameType(10)
    constant originframetype        ORIGIN_FRAME_TOOLTIP                    = ConvertOriginFrameType(11)
    constant originframetype        ORIGIN_FRAME_UBERTOOLTIP                = ConvertOriginFrameType(12)
    constant originframetype        ORIGIN_FRAME_CHAT_MSG                   = ConvertOriginFrameType(13)
    constant originframetype        ORIGIN_FRAME_UNIT_MSG                   = ConvertOriginFrameType(14)
    constant originframetype        ORIGIN_FRAME_TOP_MSG                    = ConvertOriginFrameType(15)
    constant originframetype        ORIGIN_FRAME_PORTRAIT                   = ConvertOriginFrameType(16)
    constant originframetype        ORIGIN_FRAME_WORLD_FRAME                = ConvertOriginFrameType(17)
    constant originframetype        ORIGIN_FRAME_SIMPLE_UI_PARENT           = ConvertOriginFrameType(18)
    constant originframetype        ORIGIN_FRAME_PORTRAIT_HP_TEXT           = ConvertOriginFrameType(19)
    constant originframetype        ORIGIN_FRAME_PORTRAIT_MANA_TEXT         = ConvertOriginFrameType(20)
    constant originframetype        ORIGIN_FRAME_UNIT_PANEL_BUFF_BAR        = ConvertOriginFrameType(21)
    constant originframetype        ORIGIN_FRAME_UNIT_PANEL_BUFF_BAR_LABEL  = ConvertOriginFrameType(22)
    constant originframetype        ORIGIN_FRAME_TIME_OF_DAY_INDICATOR      = ConvertOriginFrameType(23)
    constant originframetype        ORIGIN_FRAME_CINEMATIC_PANEL            = ConvertOriginFrameType(24)
    constant originframetype        ORIGIN_FRAME_ERROR_MSG                  = ConvertOriginFrameType(25)
    constant originframetype        ORIGIN_FRAME_PEON_BAR                   = ConvertOriginFrameType(26)
    constant originframetype        ORIGIN_FRAME_GROUP_BUTTON               = ConvertOriginFrameType(27)
    constant originframetype        ORIGIN_FRAME_GROUP_HP_BAR               = ConvertOriginFrameType(28)
    constant originframetype        ORIGIN_FRAME_GROUP_MANA_BAR             = ConvertOriginFrameType(29)
    constant originframetype        ORIGIN_FRAME_CARGO_BUTTON               = ConvertOriginFrameType(30)
    constant originframetype        ORIGIN_FRAME_CARGO_HP_BAR               = ConvertOriginFrameType(31)
    constant originframetype        ORIGIN_FRAME_CARGO_MANA_BAR             = ConvertOriginFrameType(32)
    constant originframetype        ORIGIN_FRAME_TOOLTIP_STRING             = ConvertOriginFrameType(33)
    constant originframetype        ORIGIN_FRAME_TOOLTIP_ICON               = ConvertOriginFrameType(34)
    constant originframetype        ORIGIN_FRAME_MOUSE_CURSOR               = ConvertOriginFrameType(35)
    constant originframetype        ORIGIN_FRAME_STRING_FPS                 = ConvertOriginFrameType(36)
    constant originframetype        ORIGIN_FRAME_STRING_APM                 = ConvertOriginFrameType(37)
    constant originframetype        ORIGIN_FRAME_STRING_PING                = ConvertOriginFrameType(38)
    
    constant framepointtype         FRAMEPOINT_TOPLEFT                   = ConvertFramePointType(0)
    constant framepointtype         FRAMEPOINT_TOP                       = ConvertFramePointType(1)
    constant framepointtype         FRAMEPOINT_TOPRIGHT                  = ConvertFramePointType(2)
    constant framepointtype         FRAMEPOINT_LEFT                      = ConvertFramePointType(3)
    constant framepointtype         FRAMEPOINT_CENTER                    = ConvertFramePointType(4)
    constant framepointtype         FRAMEPOINT_RIGHT                     = ConvertFramePointType(5)
    constant framepointtype         FRAMEPOINT_BOTTOMLEFT                = ConvertFramePointType(6)
    constant framepointtype         FRAMEPOINT_BOTTOM                    = ConvertFramePointType(7)
    constant framepointtype         FRAMEPOINT_BOTTOMRIGHT               = ConvertFramePointType(8)

    constant textaligntype          TEXT_JUSTIFY_TOP                     = ConvertTextAlignType(0)
    constant textaligntype          TEXT_JUSTIFY_MIDDLE                  = ConvertTextAlignType(1)
    constant textaligntype          TEXT_JUSTIFY_BOTTOM                  = ConvertTextAlignType(2)
    constant textaligntype          TEXT_JUSTIFY_LEFT                    = ConvertTextAlignType(3)
    constant textaligntype          TEXT_JUSTIFY_CENTER                  = ConvertTextAlignType(4)
    constant textaligntype          TEXT_JUSTIFY_RIGHT                   = ConvertTextAlignType(5)

    constant frameeventtype         FRAMEEVENT_CONTROL_CLICK             = ConvertFrameEventType(1)
    constant frameeventtype         FRAMEEVENT_MOUSE_ENTER               = ConvertFrameEventType(2)
    constant frameeventtype         FRAMEEVENT_MOUSE_LEAVE               = ConvertFrameEventType(3)
    constant frameeventtype         FRAMEEVENT_MOUSE_UP                  = ConvertFrameEventType(4)
    constant frameeventtype         FRAMEEVENT_MOUSE_DOWN                = ConvertFrameEventType(5)
    constant frameeventtype         FRAMEEVENT_MOUSE_WHEEL               = ConvertFrameEventType(6)
    constant frameeventtype         FRAMEEVENT_CHECKBOX_CHECKED          = ConvertFrameEventType(7)
    constant frameeventtype         FRAMEEVENT_CHECKBOX_UNCHECKED        = ConvertFrameEventType(8)
    constant frameeventtype         FRAMEEVENT_EDITBOX_TEXT_CHANGED      = ConvertFrameEventType(9)
    constant frameeventtype         FRAMEEVENT_POPUPMENU_ITEM_CHANGED    = ConvertFrameEventType(10)
    constant frameeventtype         FRAMEEVENT_MOUSE_DOUBLECLICK         = ConvertFrameEventType(11)
    constant frameeventtype         FRAMEEVENT_SPRITE_ANIM_UPDATE        = ConvertFrameEventType(12)
    constant frameeventtype         FRAMEEVENT_SLIDER_VALUE_CHANGED      = ConvertFrameEventType(13)
    constant frameeventtype         FRAMEEVENT_DIALOG_CANCEL             = ConvertFrameEventType(14)
    constant frameeventtype         FRAMEEVENT_DIALOG_ACCEPT             = ConvertFrameEventType(15)
    constant frameeventtype         FRAMEEVENT_EDITBOX_ENTER             = ConvertFrameEventType(16)

    constant layerstyleflag         LAYER_STYLE_SVIEWPOINT               = ConvertLayerStyleFlag(1)
    constant layerstyleflag         LAYER_STYLE_IGNORE_TRACK_EVENTS      = ConvertLayerStyleFlag(2)
    constant layerstyleflag         LAYER_STYLE_SHADING                  = ConvertLayerStyleFlag(4)
    constant layerstyleflag         LAYER_STYLE_NO_DEPTH_SET             = ConvertLayerStyleFlag(16)
    constant layerstyleflag         LAYER_STYLE_NO_DEPTH_TEST            = ConvertLayerStyleFlag(32)
    constant layerstyleflag         LAYER_STYLE_UN_CLAMPED               = ConvertLayerStyleFlag(64)

    constant controlstyleflag       CONTROL_STYLE_AUTO_TRACK             = ConvertControlStyleFlag(1)
    constant controlstyleflag       CONTROL_STYLE_CLICK_MOUSE_DOWN       = ConvertControlStyleFlag(2)
    constant controlstyleflag       CONTROL_STYLE_RELEASE_NOTIFY         = ConvertControlStyleFlag(4)
    constant controlstyleflag       CONTROL_STYLE_DRAG                   = ConvertControlStyleFlag(8)
    constant controlstyleflag       CONTROL_STYLE_HIGHLIGHT_FOCUS        = ConvertControlStyleFlag(32)
    constant controlstyleflag       CONTROL_STYLE_HIGHLIGHT_HOVER        = ConvertControlStyleFlag(64)
    constant controlstyleflag       CONTROL_STYLE_EXCLUSIVE              = ConvertControlStyleFlag(512)
    
    constant backdropborderflag     BACKDROP_BORDER_FLAG_TOP_LEFT        = ConvertBackdropBorderFlag(1)
    constant backdropborderflag     BACKDROP_BORDER_FLAG_TOP_RIGHT       = ConvertBackdropBorderFlag(2)
    constant backdropborderflag     BACKDROP_BORDER_FLAG_BOTTOM_LEFT     = ConvertBackdropBorderFlag(4)
    constant backdropborderflag     BACKDROP_BORDER_FLAG_BOTTOM_RIGHT    = ConvertBackdropBorderFlag(8)
    constant backdropborderflag     BACKDROP_BORDER_FLAG_TOP             = ConvertBackdropBorderFlag(16)
    constant backdropborderflag     BACKDROP_BORDER_FLAG_LEFT            = ConvertBackdropBorderFlag(32)
    constant backdropborderflag     BACKDROP_BORDER_FLAG_BOTTOM          = ConvertBackdropBorderFlag(64)
    constant backdropborderflag     BACKDROP_BORDER_FLAG_RIGHT           = ConvertBackdropBorderFlag(128)
    constant backdropborderflag     BACKDROP_BORDER_FLAG_ALL             = ConvertBackdropBorderFlag(255)

    constant framealphamode         FRAME_ALPHA_MODE_DISABLE             = ConvertFrameAlphaMode(1)
    constant framealphamode         FRAME_ALPHA_MODE_ALPHAKEY            = ConvertFrameAlphaMode(2)
    constant framealphamode         FRAME_ALPHA_MODE_BLEND               = ConvertFrameAlphaMode(3)
    constant framealphamode         FRAME_ALPHA_MODE_ADD                 = ConvertFrameAlphaMode(4)

// Frame API
native CeGetMouseHoveredFrame                   takes nothing returns framehandle // async!
native CeGetFrameScale                          takes framehandle whichFrame returns real
native CeGetFrameModel                          takes framehandle whichFrame returns modelhandle
native CeGetOriginFrameUnit                     takes originframetype frameType, integer index returns unit // async!
native CeGetCommandButtonData                   takes integer buttonIndex, integer dataIndex returns integer // async!
native CeGetFrameCreateContext                  takes framehandle whichFrame returns integer    
native CeSetFrameCreateContext                  takes framehandle whichFrame, integer createContext  returns nothing
native CeGetFrameLayerStyle                     takes framehandle whichFrame returns integer
native CeGetFrameControlStyle                   takes framehandle whichFrame returns integer
native CeSetFrameControlStyle                   takes framehandle whichFrame, integer newValue returns nothing
native CeSetFrameLayerStyle                     takes framehandle whichFrame, integer newValue returns nothing
native CeSetFrameTextColorEx                    takes framehandle whichFrame, integer color, integer stateIndex returns nothing    
native CeGetFrameX                              takes framehandle whichFrame returns real
native CeGetFrameY                              takes framehandle whichFrame returns real
native CeGetAdditionalScreenWidth               takes nothing returns real
native CeSetFrameTexCoord                       takes framehandle whichFrame, real left, real right, real up, real down returns nothing
native CeSetFrameBackdropMirrored               takes framehandle whichFrame, boolean mirrored returns nothing
native CeGetFrameBackdropMirrored               takes framehandle whichFrame returns boolean
native CeSetFrameBackdropTileSize               takes framehandle whichFrame, real tileSize returns nothing
native CeGetFrameBackdropTileSize               takes framehandle whichFrame returns real
native CeSetFrameBackdropBorderSize             takes framehandle whichFrame, real borderSize returns nothing
native CeGetFrameBackdropBorderSize             takes framehandle whichFrame returns real
native CeSetFrameBackdropBorderFlag             takes framehandle whichFrame, backdropborderflag flag returns nothing
native CeAddFrameBackdropBorderFlag             takes framehandle whichFrame, backdropborderflag flag returns nothing
native CeRemoveFrameBackdropBorderFlag          takes framehandle whichFrame, backdropborderflag flag returns nothing   
native CeGetFrameBackdropBorderFlag             takes framehandle whichFrame returns backdropborderflag
native CeGetFrameFunctionalChild                takes framehandle whichFrame, integer index returns framehandle
native CeGetFrameAlphaMode                      takes framehandle whichFrame returns framealphamode
native CeSetFrameAlphaMode                      takes framehandle whichFrame, framealphamode newValue returns nothing
 
Last edited:

v0.2.1.162-alpha​

  • Added an alternate CE version of the object instance API which is 1 indexed and doesn't exhibit any bugged behavior.
  • BlzSetUnitWeaponRealField now matches the bugged behavior of Reforged.
  • Fixed an issue where maps with UTF8 characters in their trigger string file would not display properly.
  • Fixed a crash that could occur after playing a second map.
  • Fixed a crash that could occur randomly after playing multiple maps.
  • Fixed a crash that would occur when importing a 0kb terrain tile texture.
  • Fixed a crash that would occur when assigning frame's parent to a simpleframe.
 
Last edited:
Level 4
Joined
Dec 23, 2023
Messages
47
Can I just use this without having to fear it breaks something for my vanilla Warcraft 3 I got from Blizzards launcher?
I have RoC Code from 2002 if this works.
 
Level 3
Joined
Mar 30, 2022
Messages
28
some map crash after loading bar reach end. log
[00:45:49 INF ] Module: 00150000
[00:45:49 INF ] Version: 0.2.1.162
[00:45:49 INF ] Game: 1.29.2.9231
[00:45:49 INF NatPuncher] Searching for NAT devices...
[00:45:50 WRN ForceFrozenThrone] Preferred Game Version forced to The Frozen Throne.
[00:46:01 WRN LuaEngine] Using modified Scripts/common.j.lua.
[00:46:01 WRN LuaEngine] Using modified Scripts/Blizzard.j.lua.
[00:46:02 WRN ] Native SetEnemyStartLocPrioCount called, but it is not implemented.
[00:46:02 WRN ] Native SetEnemyStartLocPrio called, but it is not implemented.
[00:46:02 WRN ] Native SetEnemyStartLocPrioCount called, but it is not implemented.
[00:46:02 WRN ] Native SetEnemyStartLocPrio called, but it is not implemented.
[00:46:02 WRN ] Native SetEnemyStartLocPrio called, but it is not implemented.
[00:46:03 WRN LuaEngine] Using modified Scripts/common.j.lua.
[00:46:03 WRN LuaEngine] Using modified Scripts/Blizzard.j.lua.
[00:46:03 WRN ] Native SetEnemyStartLocPrioCount called, but it is not implemented.
[00:46:03 WRN ] Native SetEnemyStartLocPrio called, but it is not implemented.
[00:46:03 WRN ] Native SetEnemyStartLocPrioCount called, but it is not implemented.
[00:46:03 WRN ] Native SetEnemyStartLocPrio called, but it is not implemented.
[00:46:03 WRN ] Native SetEnemyStartLocPrio called, but it is not implemented.
 
Top