From: metro Chicago, Illinois, USA
Having looked at the lua files the prospects for an CSME event engine are bright but we will need a generic template, particularly if direct lua support ("you are on your own")is not going to be available. The template would include generalised sections with variable perameters for set up, messages and the more common types of event thereby enabling the user to insert just a few lines to get what he wants and the learning curve is not so steep. An example of this approach is that used by Richard Bodley Scott(Byzantine,Slitherine)with his .bsf script files in "Pike and Shot". These were a great success but then he did provide direct script support. So, for lua to be successful, the generic template is going to be even more important.
You mean something like this?
$ ./csmklua.pl -a -g vn -f VN_580810_Ben_Cat.scn -o VN_580810_Ben_Cat.lua
csmklua.pl will be included with the game, in the Tools/CSlint folder. (Together with many other development and maintenance and debugging tools and scripts.)
In order to run csmklua.pl (etc.), you will need either to
install Windows Subsystem for Linux
Limited support will be provided to get modders up to speed on installing/using either of those environments.
Not only will csmklua.pl auto-generate a starter, template script for you, it will also -- grabbing info from the scenario .scn, .org files, and other files, such as the OOB files -- customize the script per the scenario in question.
Here for example is the VN_580810_Ben_Cat.lua file resulting from that above csmklua.pl command:
You will note:
It is starter template .lua file, with all of the standard routines and trigger functions already in place.
It provides helpful commentary on things you might want to do (or not want to do) (such as force special optional rules).
Fetching from the .scn file, it sets up OBJECTIVES "mnemonics" automatically.
Fetching from the .org file and others, it sets up unit org mnemonics automatically.
Sets up starter templates for inserting in-game message pop-ups.
Establishes a standard for organizing each side's "battle plans", and their execution.
And other stuff besides.
The Tools/CSlint toolkit also includes at least one utility to QA check your .lua file creation:
$ ./csluachk.pl -n +w +e -g vn -f CSLUACHK1.lua
ERROR: /usr/bin/luac: ...mes/Matrix Games/Vietnam/vietnam/Scenarios/CSLUACHK1.lua:12: ')' expected near '|'
ERROR: for CSLUACHK1.lua:12: mistaken OPT: OPTNONESUCH
ERROR: for CSLUACHK1.lua:237: mistaken LOG: LINCOLNLOG
ERROR: for CSLUACHK1.lua:245: mistaken LOG: LOG_ARITHM
ERROR: for CSLUACHK1.lua:253: mistaken LOG: LOG_LOG
ERROR: for CSLUACHK1.lua:253: mistaken LOG: LOG_LOG
ERROR: for CSLUACHK1.lua:458: mistaken DIR: UPRDIR
ERROR: for CSLUACHK1.lua:481: mistaken DIR: UPRDIR
ERROR: for CSLUACHK1.lua:528: mistaken DIR: LEFTDOWNDIR
ERROR: for CSLUACHK1.lua:223: illegal space in luav index: " _6E_BATAILLON_DE_PARACHUTISTES_COLONIAUX_1ER_COMPAGNIE_STATUS"
ERROR: for CSLUACHK1.lua:232: illegal space in luav index: "_II_1ER_RCP_BATAILLON_DE_CHASSEURS_PARACHUTISTES_5E_COMPAGNIE_STATUS "
ERROR: for CSLUACHK1.lua:235: illegal space in luav index: "_II_1ER_RCP_BATAILLON_DE_CHASSEURS_PARACHUTISTES _8E_CIP_STATUS"
ERROR: for CSLUACHK1.lua:450: malformed objective hex coordinates: "18, 24"
ERROR: for CSLUACHK1.lua:458: malformed objective hex coordinates: "18, 24"
ERROR: for CSLUACHK1.lua:473: malformed objective hex coordinates: "18 ,24"
ERROR: for CSLUACHK1.lua:481: malformed objective hex coordinates: "18 ,24"
ERROR: for CSLUACHK1.lua:496: malformed objective hex coordinates: " 16,23"
ERROR: for CSLUACHK1.lua:500: malformed objective hex coordinates: " 16, 23"
ERROR: for CSLUACHK1.lua:519: malformed objective hex coordinates: "15,33 "
ERROR: for CSLUACHK1.lua:528: malformed objective hex coordinates: "15, 33 "
ERROR: for IC_511209_Tu_Vu.lua:308: duplicate org name: _TIEU_DOAN_PHAO_BINH_DAI_DOI_SUNG_COI_50_120MM_TRUCKS
ERROR: for IC_511209_Tu_Vu.lua:318: duplicate org name: _TRUNG_DOAN_HQ
ERROR: for IC_511209_Tu_Vu.lua:446: duplicate org name: _TIEU_DOAN_PHAO_BINH_DAI_DOI_PHAO_BINH_50_105MM_TRUCKS
ERROR: for IC_511209_Tu_Vu.lua:447: duplicate org name: _TIEU_DOAN_PHAO_BINH_DAI_DOI_PHAO_BINH_50_105MM_TRUCKS
ERROR: for IC_511209_Tu_Vu.lua:448: duplicate org name: _TIEU_DOAN_PHAO_BINH_DAI_DOI_PHAO_BINH_50_105MM_TRUCKS
ERROR: for IC_511209_Tu_Vu.lua:449: duplicate org name: _TIEU_DOAN_PHAO_BINH
ERROR: for IC_511209_Tu_Vu.lua:455: duplicate org name: _TIEU_DOAN_PHAO_BINH_DAI_DOI_DAC_CONG
(The above is from QA checking a standard test .lua file.)
So not only will Tools/CSlint make your standard starter .lua file templates, it will even QA check them for you!
Will there be a CSEE HOW-TO tutorial, and doc? Yes, although maybe not ready for the initial 1.0 release. (Sorry about the delay.)
Is there already a LUA_FUNCTIONS_REFERENCE.txt, documenting use of the 400+ CSEE functions? Why, yes there is!
Will there be on-line user support for all of this? Within reason, yes there will be. (Continuing the active participation and responsiveness that we, the Campaign Series Legion, are well known for.)
Does all of this answer your questions, set your mind at ease?
< Message edited by berto -- 3/24/2019 9:45:54 PM >