Page 1 of 2 12 LastLast
Results 1 to 20 of 36

Thread: W.A.L.I

  1. #1
    Inevitability won
    Patrician Citizen

    Join Date
    Mar 2010
    Posts
    9,594

    Default W.A.L.I

    W.A.L.I

    NOTE: Please note that this project, its programs, its scripting and all accompanying files remain somewhat unfinished!


    All source files of this project are hereby being released to the public under a BSD 2-Clause license in the state they are in now. This program will likely be of use to only a select few with extensive C# and Lua knowledge.
    This is NOT a mod. This is NOT a tool to make mods.

    Overview Short for "Warscape Added Lua Interface", WALI is a program created to extend the use of the Total War's Warscape Engine Lua scripting functionality by editing the games running memory in tailored ways so as to simulate new or enhanced gameplay mechanics. While initially targeting ETW the scope of the project was for all games using the Warscape engine.

    Rationale Myself and Topcat began experiments to test the implications that runtime memory editing could have on modding and documenting our findings and research here. The end goal was to expand modding in some way through the implementation of bespoke memory editing software, WALI was the result and the fruits of our labour.



    Technical Overview The main idea of the project was to allow us to do more with the Lua scripting functionality of the game, scripting was the only realistic target of this project, it is the only aspect of modding that has the scope to be utilized and worthwhile to expand in order to gain the added mechanics we desired.
    We first documented the memory structure of various elements of the campaign map, namely armies and cities, and then began testing methods by which the scripting could be extended to utilize memory editing. It appeared the only realistic method to achieve our aim was to utilize the inbuilt functionality of the games scripting to output base memory addresses of armies and cities on the campaign map; from these we could easily locate and thus edit various elements of the armies and cities.
    The main problem faced was allowing the Lua scripting to communicate with the WALI engine, we eventually settled on a simple file based read/write system. The main concern with this method was speed, but after testing we ascertained it was much much quicker than would ever be necessary.

    Application Process
    A basic overview of the process is as such:

    Modder utilizes added scripting functions within the games Lua scripting -> The API deals with the function call and communicates to WALI -> WALI deals with the command sent from the scripting and edits running memory -> WALI communicates back to Lua if necessary

    The project consists of a launcher (Launcher_ETW.exe) that integrates Mod Manager and also starts up and initializes the actual engine, nicknamed WALI, (WALI_Engine.exe). All scripting (WALI.lua) is referenced and loaded from within the games campaign scripting (scripting.lua). The main focus of the scripting is to provide an API to the modder and to deal with the communication with the engine. After launch WALI monitors for files created by the scripting through the API and deals with them then communicates back via a similar method if necessary.

    The commands that can be passed to WALI are defined via .wcf files, these files not only define what commands are available but also how WALI should deal with them.

    Current Implementations We aimed to create one game mechanic ourselves to test the concept of what we were doing, we settled on implementing the attrition game mechanic of NTW into ETW. The current build of the project had this feature working apart from one region naming bug which TC assessed was fixable. The attrition feature of WALI utilized an attrition colour map that would be referenced by WALI and compared to in-game coordinates sent from Lua, the result was then communicated back to Lua after the campaign map army had its units edited (decreased to simulate death).
    A problem we wanted to overcome was the in-game UI aspect of what we were doing, we felt it very necessary to communicate to the player the results of the engine. This took the form of skulls within the attrition feature, based on NTW's implementation.

    Contributors All of the programming was written by .Mitch.
    All Lua scripting was written by T.C.
    Mod Manager source courtesy of LtChambers
    Map file assistance from PietroMicca

    License
    Everything here I have decided to release under a BSD 2-Clause license, basically you may use this project as you wish, you may utilize it in source and binary forms, with or without modification, the only clauses to this license are that you retain the previous license and keep all previous copyright. Here is the full license below:

    Copyright (c) 2013, Mitchell Heastie, Daniel Rogers, Matt Chambers
    All rights reserved.


    Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

    • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.


    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


    Final Words
    The possibilities of this project were, and still are I suppose, truly endless. Being able to edit the very memory the game does through its own game mechanics allows the possibility of creating whatever game mechanic one desires; the feasibility of doing so however, is largely unrealistic.
    In the end this project more than anything for myself and Topcat was a simple experiment, to see just what we could do, and to try and push the boundaries of modding beyond what it had known before. Alas while we did manage an amazing feat, putting attrition into ETW, the sheer work involved and the little impact such a feat had meant the work required to continue was sadly not worth it, and so our interest died and other priorities such as University took over. The sad fact is that modding for Warscape is not a large vibrant community that would be required to make something like this fully worth it and in the end that was the final nail in the coffin for why I personally stopped working on this. There is no point working on something, even something great, if nobody is around to use it. Though I hold no bitterness in that, I enjoyed working on this a lot, and the aim was never really to make a widely used tool, we both knew that we would both be the only ones to ever use it realistically.
    Even if I doubt anyone will ever use this, for that one in a million chance that someone, some day, somewhere might find even the slightest use for what was a lot of work from both of us, I feel it worth it to post this.

    Again I must say this will be of no use to most people, to those who were looking forward to this I say sorry, to anyone who does ever bother with this in any capacity I say... Thanks, I guess.

    DOWNLOAD
    Last edited by .Mitch.; June 15, 2013 at 12:15 PM.

  2. #2
    wangrin's Avatar Unguibus et Rostro
    Patrician Artifex

    Join Date
    Feb 2005
    Location
    France
    Posts
    4,397

    Default Re: W.A.L.I

    You are our saviour
    Now, it should be possible to create a true "unit evolution system".

    But, I you have written above, warscape modding community is not a large one and such project would need a lot of work.

    At least, thank you very much to you, T.C., LtChambers and PietroMicca for you work


    EDIT : I'm unable to extract WALI from zip.

    I've got error 0x8004005 (unspecified) for several files such as :

    • Common.dll
    • Launcher_ETW.exe
    • test.lua
    • WALI.lua
    • WALI_ENgine.exe
    • etc.
    Last edited by wangrin; June 15, 2013 at 03:02 AM.


    « Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES

  3. #3

    Default Re: W.A.L.I

    I saw your original thread about this. It seems to be a ambitious project. Congratulations to all of you for the effort. By your words it seems to be stopped, but at the same time it has a lot of possibilities. You say that your initial goal was to bring Napoleón TW atrition system to Empire. wangrin has said it may permit to créate an evolution of the units, which I am interested in. Your description of the functionability is very technical, so I want to ask you what else can be expected to be achieved in terms of gameplay?

  4. #4

    Default Re: W.A.L.I

    I might write a tutorial for this later, if I get time. Unit evolution is possible, but difficult. Any task involving this requires a compotent programmer; unit evolution requires a good programmer.

    Edit: It's really not likely to happen, I forgot how extensive this project was. I'm not writing a small essay to describe how to use this that no-one will use. If anyone wants to know how to use this, pm me and I'll walk them through it. I don't post much, but I'm online every few days. Please note that I won't explain this to someone who can't program, or can't script for ETW competently. I'm not going to try and teach someone to program just so they can use this; if you want to use it that badly go and learn to program. There's loads of guides online, it's how I learned.

    Sorry if this sounds blasé, but I don't have the time to teach someone to program through pm's and IM's.

    I'll probably resume this project for R2 in September.

    Edit 2: The best way you can describe what this can do is to think of an esf file. Any simple values that can be changed using an esf editor can be changed using this. Other values can be changed also, but they won't persist through save games so we gave them no consideration e.g unit reloading skill, which is a db attribute not esf. By simple values I mean values that are only represented in one entry in the esf (think current unit size, character age, religion values etc) rather than complex values represented over multiple locations (eg region ownership). The complex values can be changed in time, with extensive research. Just not yet.
    Last edited by T.C.; June 15, 2013 at 07:58 AM.
    My Tools, Tutorials and Resources

    Was running out of space, so see the full list here!

    Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.- Josh Billings
    The creatures outside looked from pig to man, and from man to pig, and from pig to man again; but already it was impossible to say which was which.- George Orwell

  5. #5

    Default Re: W.A.L.I

    I have problems to extract it as well, please check and re upload it.




  6. #6

    Default Re: W.A.L.I

    I'll upload a version here, I've just seen some of the Lua I wrote was never committed to the SVN. I'll commit also
    My Tools, Tutorials and Resources

    Was running out of space, so see the full list here!

    Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.- Josh Billings
    The creatures outside looked from pig to man, and from man to pig, and from pig to man again; but already it was impossible to say which was which.- George Orwell

  7. #7
    Steph's Avatar Maréchal de France
    Patrician Artifex

    Join Date
    Apr 2010
    Location
    Pont de l'Arn, France
    Posts
    9,174

    Default Re: W.A.L.I

    I'm very interested by this, given the number of units and periods with have in MoE. I'm a programmer myself, and know C# relatively well. So I suppose I could understand how it works. I'm unfortuntately very busy at the office right now, so it may be a little difficult to work on that at the moment.
    I have two questions:
    - Can it work also for NTW?
    - You mentionned map and units. Can it work also with agents and generals?

  8. #8
    Inevitability won
    Patrician Citizen

    Join Date
    Mar 2010
    Posts
    9,594

    Default Re: W.A.L.I

    I just attached a new zip file, hopefully this one works, it contains Topcat's newly commited files he talked about as well. Though I did download and extract the old .zip and it worked for me.. strange.

    Quote Originally Posted by Steph View Post
    I have two questions:
    - Can it work also for NTW?
    - You mentionned map and units. Can it work also with agents and generals?
    1) Making it work for NTW is very trivial, WALI_Engine.exe takes command line arguments the first of which needs to be the name of the application its using ("Empire" or "Napoleon") this allows one program instead of having to make many for all games, it takes a host of other commands too, see inside the source for details. Launcher_ETW.exe is responsible for sending the relevant game to WALI on launch.

    2) As Topcat described pretty much anything inside the ESF is editable, providing you know the base addresses, so yes it can work with, armies, units, generals, ages, towns, cities, regions, etc. However we only put real effort into decoding the armies & units as they were what we needed to test our chosen concept (attrition).
    Last edited by .Mitch.; June 15, 2013 at 12:06 PM.

  9. #9

    Default Re: W.A.L.I

    I'm going to just do some more updates, I'll put them in this post. The checkout URL for the repository is https://wali-engine.svn.sourceforge....ot/wali-engine (read only, no commits unless we allow you admin access).

    The updates will only be comments in some of the C# code, just to make it easier to look back over.
    My Tools, Tutorials and Resources

    Was running out of space, so see the full list here!

    Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.- Josh Billings
    The creatures outside looked from pig to man, and from man to pig, and from pig to man again; but already it was impossible to say which was which.- George Orwell

  10. #10
    Inevitability won
    Patrician Citizen

    Join Date
    Mar 2010
    Posts
    9,594

    Default Re: W.A.L.I

    Yeh I did kind of lack in that department. =/

    Instead of upload here, I have instead directly linked to the download of the repository so that any updates will be downloaded too.

  11. #11

    Default Re: W.A.L.I

    Updated the svn with more documentation in relevant places. I've added quite a few basic readme's and how-to's. Certainly not a comprehensive tutorial, but it should be enough to get people started, including getting it running in game and adding new commands. If anyone wants to utilise this, they'll need to be able to pull memory address's from the game via Lua. I've not wrote any tutorials on this, but if you check out the Script-o-Rama there's some documentation there that should get you on the right track. See my sig for a link.
    My Tools, Tutorials and Resources

    Was running out of space, so see the full list here!

    Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.- Josh Billings
    The creatures outside looked from pig to man, and from man to pig, and from pig to man again; but already it was impossible to say which was which.- George Orwell

  12. #12
    Flikitos's Avatar Campidoctor
    Join Date
    Dec 2009
    Location
    France
    Posts
    1,661

    Default Re: W.A.L.I

    Wow just Wow!! Thank you so much guys! Will try it! THANK YOU!!!

    Spoiler Alert, click show to read: 

  13. #13
    TuranianGhazi's Avatar Biarchus
    Join Date
    Jan 2012
    Location
    Seattle, WA
    Posts
    614

    Default Re: W.A.L.I

    Woa, this does sound like a revolutionary opening of modding windows and possibilities! Congratulations!!! Much thanks!

    So, unit evolution IS possible, just need good coding? I've programmed before in Java, C++, and IDL. So, I'm pretty sure I can get the gist of it, I think. I may not be super advanced, but competent enough to understand and follow.

    I'm interested with wangrin in figuring out unit evolution. I just think unit evolution is a very culpable and meaningful gameplay element that players would appreciate. I know for myself I would like to establish some veterancy promotions and reforms that evolve a unit.

    Best regards, peace
    TG




  14. #14

    Default Re: W.A.L.I

    Quote Originally Posted by TuranianGhazi View Post
    Woa, this does sound like a revolutionary opening of modding windows and possibilities! Congratulations!!! Much thanks!So, unit evolution IS possible, just need good coding? I've programmed before in Java, C++, and IDL. So, I'm pretty sure I can get the gist of it, I think. I may not be super advanced, but competent enough to understand and follow. I'm interested with wangrin in figuring out unit evolution. I just think unit evolution is a very culpable and meaningful gameplay element that players would appreciate. I know for myself I would like to establish some veterancy promotions and reforms that evolve a unit.Best regards, peaceTG
    Well start off by downloading and looking at the WALI.lua file. If you can read through that and follow it, you're well able for this. You can also check this thread for function documentation. I'll update it tonight and tomorrow so it includes documentation for some functions that were missed last time around. If you can get that far, I'll get you set up mapping out and documenting memory. We've only documented about 5% of the useable memory so far, for unit evolution we need a lot more.

    If you guys can get together and make this happen, from your end (ie being able to use it), I'll gladly support this tool. It's far from finished at present (consider it a Beta) and has a long way to go. Down the road, if people learn to use this, stuff like region swapping seems quite possible to me.
    Last edited by T.C.; June 15, 2013 at 05:28 PM.
    My Tools, Tutorials and Resources

    Was running out of space, so see the full list here!

    Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.- Josh Billings
    The creatures outside looked from pig to man, and from man to pig, and from pig to man again; but already it was impossible to say which was which.- George Orwell

  15. #15
    Inevitability won
    Patrician Citizen

    Join Date
    Mar 2010
    Posts
    9,594

    Default Re: W.A.L.I

    Quote Originally Posted by T.C. View Post
    If you guys can get together and make this happen, from your end (ie being able to use it), I'll gladly support this tool. It's far from finished at present (consider it a Beta) and has a long way to go. Down the road, if people learn to use this, stuff like region swapping seems quite possible to me.
    I echo this statement, while I will not directly continue to develop this, anyone who does wish to pick this up will have my support. An added caviate to that is that I won't waste my time supporting anyone who I feel does not have the long term capability to use and develop this themselves.

  16. #16

    Default Re: W.A.L.I

    Managing atrition seems to be a strong concept in this project

  17. #17

    Default Re: W.A.L.I



    Launcher_ETW.exe:-16/6/2013 10:41:39 πμ ==> Invalid path:C:\Users\Eg\Desktop\wali-engine\Engine\Engine.exe Empire
    Last edited by husserlTW; June 16, 2013 at 03:14 AM.




  18. #18
    Quintus Hortensius Hortalus's Avatar Lex duodecim tabularum
    Citizen

    Join Date
    Jun 2011
    Location
    Electorate of Hannover
    Posts
    2,524

    Default Re: W.A.L.I

    WOW!!! This is great All those possibilities, simply amazing!

    Under the patronage of wangrin my workshop

  19. #19
    wangrin's Avatar Unguibus et Rostro
    Patrician Artifex

    Join Date
    Feb 2005
    Location
    France
    Posts
    4,397

    Default Re: W.A.L.I

    Same error than husserlTW

    ETW is in the steam folder on C:
    W.A.L.I is in my "modding" folder on D:
    Mod manager look fine.


    « Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES

  20. #20

    Default Re: W.A.L.I

    Quote Originally Posted by Bethencourt View Post
    Managing atrition seems to be a strong concept in this project
    Yes, the attrition code actually dwarfed the WALI implementation code. Which says a lot about the engine and the state of Warscape scripting - the tools to make it happen are very compact and efficient, but the code required to make anything worthwhile happen is much more extensive.

    Quote Originally Posted by husserlTW View Post
    Quote Originally Posted by wangrin View Post
    Same error than husserlTW

    ETW is in the steam folder on C:
    W.A.L.I is in my "modding" folder on D:
    Mod manager look fine.
    I'll look into this today. Please remember this tool is in Beta and was only verified working on mine and Mitch's machines; as such things like directory finding may still be somewhat hardcoded.
    My Tools, Tutorials and Resources

    Was running out of space, so see the full list here!

    Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.- Josh Billings
    The creatures outside looked from pig to man, and from man to pig, and from pig to man again; but already it was impossible to say which was which.- George Orwell

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •