Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

What we need from Lua

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Campaign Series: Middle East 1948-1985 >> Mods and Scenarios >> What we need from Lua Page: [1]
Login
Message << Older Topic   Newer Topic >>
What we need from Lua - 3/13/2019 1:59:35 PM   
edward77

 

Posts: 21
Joined: 7/27/2010
Status: offline
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.
Post #: 1
RE: What we need from Lua - 3/13/2019 3:00:45 PM   
berto


Posts: 18567
Joined: 3/13/2002
From: metro Chicago, Illinois, USA
Status: online
quote:

ORIGINAL: edward77

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?



rober@Rob10rto ~/cslint
$ ./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 Cygwin

    or

  • 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:



    rober@Rob10rto ~/cslint
    $ ./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?

    Attachment (1)

    < Message edited by berto -- 3/24/2019 9:45:54 PM >


    _____________________________


    (in reply to edward77)
  • Post #: 2
    RE: What we need from Lua - 3/13/2019 9:37:41 PM   
    edward77

     

    Posts: 21
    Joined: 7/27/2010
    Status: offline
    Wow, Very impressive. You are well on the way. Thank you

    (in reply to berto)
    Post #: 3
    RE: What we need from Lua - 3/13/2019 10:01:31 PM   
    Jason Petho


    Posts: 13432
    Joined: 6/22/2004
    From: Terrace, BC, Canada
    Status: offline
    Of course, all these goodies will be included in the next UPDATE for Middle East.

    That will come out after Vietnam though, as Vietnam is our primary focus.

    _____________________________


    (in reply to edward77)
    Post #: 4
    RE: What we need from Lua - 3/13/2019 10:21:57 PM   
    Crossroads


    Posts: 15306
    Joined: 7/5/2009
    Status: offline
    I've wanted to begin a blog series on our lua CS Event Engine together with all the latest and greatest. Need to get it started, right. 25th hour to each day, anyone?

    _____________________________

    Visit us at: Campaign Series Legion
    ---
    CS: Vietnam | CS: East Front 1939-1941 IN-THE-WORKS
    CS: Middle East 1948-1985 Fully reimaged v2.0 available now!

    (in reply to Jason Petho)
    Post #: 5
    RE: What we need from Lua - 3/13/2019 10:45:42 PM   
    Jason Petho


    Posts: 13432
    Joined: 6/22/2004
    From: Terrace, BC, Canada
    Status: offline
    quote:

    25th hour to each day, anyone?


    +1 YES PLEASE!

    _____________________________


    (in reply to Crossroads)
    Post #: 6
    Page:   [1]
    All Forums >> [New Releases from Matrix Games] >> Campaign Series: Middle East 1948-1985 >> Mods and Scenarios >> What we need from Lua Page: [1]
    Jump to:





    New Messages No New Messages
    Hot Topic w/ New Messages Hot Topic w/o New Messages
    Locked w/ New Messages Locked w/o New Messages
     Post New Thread
     Reply to Message
     Post New Poll
     Submit Vote
     Delete My Own Post
     Delete My Own Thread
     Rate Posts


    Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

    0.148