View unanswered posts | View active topics It is currently Thu Jan 09, 2025 10:35 pm



Reply to topic  [ 9 posts ] 
 The new activities format (CCMM) 
Author Message
User avatar

Joined: Sun Dec 27, 2009 9:31 am
Posts: 170
Reply with quote
Post The new activities format (CCMM)
I'm at the point to start redoing the skirmish activities, and I have a few questions.

  • Why do normal .ini activities no longer work with mods? I have heard several reports that in B24, skirmish activities will work with normal units, but not with mods. Is it impossible for mods to work with an ini activity now?
  • What are the advantages to Lua activities? I understand there is now "auto-randomness", but it appears from a quick look that the randomness is simply created via Lua, and there is nothing stopping a set number of ships to appear, in the way that ini activities used to work.
  • Are the Lua activities files located in [cc_directory]/Base.rte/Scenes/Scripts? Is Missions.rte used any more?

For #2 right there, I was thinking of a large generated lua table that looked like this:
Code:
self.Craft = {
    {
        name="craft_name"
        actors = {
            {
                name="actor_name",
                weapons=
                {
                    "weapon_1_name",
                    "weapon_2_name"
                }
            }
        }
    }
};


I'm relatively new to Lua, but I know something like that would work in javascript. Could that work in Lua?

I'll probably have some more questions.


Sat Mar 19, 2011 1:37 am
Profile
User avatar

Joined: Wed Sep 09, 2009 3:16 am
Posts: 3032
Location: Somewhere in the universe
Reply with quote
Post Re: The new activities format (CCMM)
Unfortunately no.

Yeah i used Java too. Anyways basically, when using 'if' you put the condition and use the statement 'then' instead of a {.
For the } use the word 'end' instead.


Well since i'm probably less versed in Lua then you, I didn't realize it was a table. I don't see anything like this in the base activities but meh.


Last edited by dragonxp on Sat Mar 19, 2011 7:41 am, edited 1 time in total.



Sat Mar 19, 2011 2:17 am
Profile
User avatar

Joined: Sun Dec 27, 2009 9:31 am
Posts: 170
Reply with quote
Post Re: The new activities format (CCMM)
I know Lua syntax, and Java != Javascript. I'm talking about a table creation, not an if statement. What I posted was not javascript, it was Lua. If it was javascript, then the array-like object would use square brackets [] instead of curly ones {}.


Sat Mar 19, 2011 2:19 am
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Tue May 25, 2010 8:27 pm
Posts: 4521
Location: Constant motion
Reply with quote
Post Re: The new activities format (CCMM)
SneakyMax wrote:
Why do normal .ini activities no longer work with mods?
Nope, they still do. I haven't noticed any change in the way the old system works across builds.
SneakyMax wrote:
What are the advantages to Lua activities?
Really, it allows much greater control over the mission itself, meaning every skirmish could have its little quirks, like CC48's wave system. Also, settings based on difficulty will not work in the old format. Since Data has decided that the focus of all missions will be Lua activities, we as modders would be wise to follow suit.
SneakyMax wrote:
Are the Lua activities files located in [cc_directory]/Base.rte/Scenes/Scripts? Is Missions.rte used any more?
Yes they are located there, but Missions.rte is still used for more mission-like activities such as First Signs and Zombie Cave.


Fri Mar 25, 2011 12:19 am
Profile
User avatar

Joined: Sun Dec 27, 2009 9:31 am
Posts: 170
Reply with quote
Post Re: The new activities format (CCMM)
Excellent, thank you. Why are so many people complaining that custom skirmish isn't working with mods, then?


Fri Mar 25, 2011 12:50 am
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Tue May 25, 2010 8:27 pm
Posts: 4521
Location: Constant motion
Reply with quote
Post Re: The new activities format (CCMM)
No idea, I haven't really heard that at all.


Fri Mar 25, 2011 12:52 am
Profile
User avatar

Joined: Sun Feb 21, 2010 10:40 pm
Posts: 97
Reply with quote
Post Re: The new activities format (CCMM)
CC seems to have been hardcoded to comment out the activities out of anything that includes them. This happens with my own mod, any files with activities I make it will automatically put a // next to them in the index, requiring the deletion of the comment for them to work. Even then, CC will figure out later on that I deleted the comment and it will put it back again, creating a viscous cycle. This didn't happen in B23 as far as I know.

This might be why some people are complaining.


Tue Mar 29, 2011 12:10 am
Profile
User avatar

Joined: Sun Dec 27, 2009 9:31 am
Posts: 170
Reply with quote
Post Re: The new activities format (CCMM)
CCMM is the one doing that, because in B23 only one activity could be active at one time. I'm not sure if it still does that in 2.1.


Tue Mar 29, 2011 2:01 am
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Tue May 25, 2010 8:27 pm
Posts: 4521
Location: Constant motion
Reply with quote
Post Re: The new activities format (CCMM)
I didn't tell it not to, so unless you did then it still will.


Tue Mar 29, 2011 5:22 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 9 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.035s | 13 Queries | GZIP : Off ]