ceres-wc3 / ceres Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
An API to modify misc map data should be present. This will require .w3i
parsing as well as modifying MiscData.txt
and other files with game constants.
This is necessary for testing the current code in a closer-to-real-world scenario.
Currently there are no tests which makes regressions very easy to slip in. Having a sample project to test against with all basic features is a must before 0.3.
The require function accepts the syntax 'event/spell', when it should only accept 'event.spell'. Using both forms causes modules to be loaded twice, leading to... weird issues.
This option (-graphicsapi) is crucial for wc3 to work in some systems. Shouldn't be hard to add, since window_mode option is present already. Could do it myself, if only I was accustomed to the project and the language.
ceres does not seem to be able to parse () if its used in "elseif", as in "if".
This means that:
if (group.orderType == Ids.orderTypes.ORDER_GOLDMINE) then
elseif (group.orderType == Ids.orderTypes.ORDER_GOLDMINE) then
end
Will throw an error.
And:
if (group.orderType == Ids.orderTypes.ORDER_GOLDMINE) then
elseif group.orderType == Ids.orderTypes.ORDER_GOLDMINE then
end
Will run just fine.
the error message is akin to:
[�[31mERROR�[0m] -> Could not run map.
[�[31mERROR�[0m] -> Cause: Could not build map.
[�[31mERROR�[0m] -> Cause: Could not build the script.
[�[31mERROR�[0m] -> Cause: Parsing error in xxx\src\AIWorker.lua
[�[31mERROR�[0m] -> Cause: --> 47:63
|
47 | elseif (group.orderType == Ids.orderTypes.ORDER_GOLDMINE) then␍␊
| ^---
|
= expected StmtReturn, Stmt, Index, MethodCall, or Args
After cloning the pure Lua template and running the build command:
> ceres build -- --map mpq.w3x --output mpq
The build prints complete and produces the map in target/
but the exe never returns control to the shell:
> ceres build -- --map mpq.w3x --output mpq
> Received build command
> Input: mpq.w3x
> Retain map script: true
> Output type: mpq
> Loaded map mpq.w3x
> Loaded map script from mpq.w3x
> Successfuly built the map
> Writing artifact [mpq] to target/mpq.w3x
> Build complete!
^C ### Had to CTRL-C at this point to get my terminal back.
>
Implement a Lua API for manipulating object data at compiletime. Initial version must have these features:
Currently all modules are defined as local functions, they should just be functions.
Because of this when you reach 200 modules, it will no longer run.
It seems all the parameters work except unit id.
How do I get a unit id from a 4-character string?
I have tried two functions, FourCC and UnitId, no success.
Calling CreateUnitAtLoc(Player(0), FourCC('hfoo'), GetPlayerStartLocationLoc(Player(0)), 0)
as a custom script works fine.
Additionally, when looking at the compiled version, FourCC has two arguments.
EDIT: When removing the first variable in the compiled FourCC function, it seems to work.
That means the compiled FourCC might be the problem.
The provided link points to the following address: https://discord.com/invite/M4KXP9a
When visiting it, however, discord tells us that the link is no longer valid:
Create a manual please.
too much text, too much uknown environment, just short starter guide, please.
Module names which contain non-ident valid chars will break the emitted Lua code. Need to escape them, or provide auto-generated module names, or use string literals.
Hi. When I put this to src and rename Main.lua to main.lua I get:
=> main λ (~/tmp/purescript/ps-to-lua-test/ceres) = ceres build -- --map WorldEditTestMap.w3x
> Received build command
> Input: WorldEditTestMap.w3x
> Retain map script: true
> Output type: mpq
> Loaded map WorldEditTestMap.w3x
> WARN: Could not extract script from map WorldEditTestMap.w3x: File not found
> WARN: Map script won't be included in the final artifact
> Building without including original map script
> ERR: Map build failed:
> Could not compile module [castl.constructor.error.error] ("src/castl/constructor/error/error.lua"):
Cyclical dependency found involving module castl.internal
But when I use original Lua interpreter, it works fine
=> main λ (~/tmp/purescript/ps-to-lua-test/ceres/src) = lua main.lua
Power of PureScript!
Is it possible to make it work?
I use http://www.purescript.org as a scripting language
It compiles to JavaScript and then I use https://github.com/PaulBernier/castl to compile it from JavaScript to Lua. castl/ directory comes from lua/castl in the previously mentioned repository and it contains runtime for JavaScript
An API to modify/query terrain would be very useful for dynamic terrain operations, esp. pathing and the likes. Must be able to generate a terrain from scratch.
The Windows release being provided in the releases is a .tar.gz which Windows cannot unpack with native tools. So providing that as the Windows release is a little cumbersome.
If you could switch the Windows release to be packaged as a .zip, while maybe increasing the size would make it instantly usable on Windows machines.
Master issue for the map modification API.
Ceres must be able to create WC3 maps entirely from scratch, without using any existing map files (exceptions may be files embedded within Ceres for convenience).
This includes but is not limited to:
You once mentioned to me that there was a method of modifying unit fields, like units builds array in either war3mapextra or wa3mapmisc, do you remember how that was done?
Already tested:
Some good candidates for unit testing:
Ideas for functional testing:
Probable cause:
TOML probably tries to escape the characters in the path, leading to invalid UTF-8 and failing to parse the config
Possible solutions:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.