View unanswered posts | View active topics It is currently Thu Apr 25, 2024 5:29 pm



Reply to topic  [ 69 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
 King Assault Gamemode 
Author Message

Joined: Sat Jan 13, 2007 11:04 pm
Posts: 2932
Reply with quote
Post Re: King Assault Gamemode
mail2345 wrote:
Anyway, anybody know a good way to pass data to a lua based on what scene it's on?

Might help give a bit of AI spawn bias in single player mode.


Data said he's working on Lua documentation (for real this time I hope) so I think those will explain stuff.


Mon Apr 06, 2009 8:42 am
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: King Assault Gamemode
real lua documentation would be beautiful. i want to play with the AI.


Mon Apr 06, 2009 10:51 am
Profile WWW
Data Realms Elite
Data Realms Elite
User avatar

Joined: Wed Sep 05, 2007 4:14 am
Posts: 3966
Location: Canadida
Reply with quote
Post Re: King Assault Gamemode
Eh, this game mode is fun, but I just end up scuttling dropships, and launching engines and doors at anything that moved, or used to move.

Then with Lua Docs, soon to be all over the place, I'll look forward for using spline algorithms to make some sort of cluster ♥♥♥♥ swarms of some sort.
Ah, the thought of a laser bean beam carving through a group of fodder multiple times, or a cloud of powder violating a heavy metal wall.


Tue Apr 07, 2009 8:09 am
Profile

Joined: Sun May 18, 2008 5:02 pm
Posts: 380
Location: Florida
Reply with quote
Post Re: King Assault Gamemode
Can you make a version that starts you off with a random faction?
Like Coalition and dummy.


Mon Apr 27, 2009 11:54 pm
Profile
User avatar

Joined: Mon Apr 28, 2008 1:35 am
Posts: 383
Reply with quote
Post Re: King Assault Gamemode
there already is.
go into the assault.lua file and at the beginning somewhere there is a selection "menu" thing. You can do I think 1-5 for different factions/weapon types. There are lots of other options you can fiddle around with also, if you like that sort of thing.


Tue Apr 28, 2009 12:35 am
Profile

Joined: Sun May 18, 2008 5:02 pm
Posts: 380
Location: Florida
Reply with quote
Post Re: King Assault Gamemode
I can't find the file anywhere.


Tue Apr 28, 2009 10:23 pm
Profile
User avatar

Joined: Tue Nov 06, 2007 6:58 am
Posts: 2054
Reply with quote
Post Re: King Assault Gamemode
Err, check your King Assult folder?


Wed Apr 29, 2009 1:51 am
Profile

Joined: Sun May 18, 2008 5:02 pm
Posts: 380
Location: Florida
Reply with quote
Post Re: King Assault Gamemode
mail2345 wrote:
Err, check your King Assult folder?

That's what I did, where else would I check?


Wed Apr 29, 2009 2:09 am
Profile
User avatar

Joined: Mon Apr 28, 2008 1:35 am
Posts: 383
Reply with quote
Post Re: King Assault Gamemode
F:\Cortex Command21\King Assault\Assault.lua
this is the location on my computer.
don't ask why it is 21 and not 22... I'm a little behind on my build names I guess.

on yours it is probably
C:\Program Files\Data Realms\Cortex Command\King Assault\Assault.lua

This is what the first part looks like in its entirety
Quote:
function AssaultMission:StartActivity()
--[[
Assault
a King of the Hill style gamemode.
Capture over 3 of the 4 Zones to take control of the base.
Capture Zones by having more bodies in the area than your opponent.
Hold the base longer than your opponent within the time limit to win!

The attacker recieves gold slightly faster than the defender.
AI will move attacking troops directly to a random zone.
Defending troops move to area directly underneath the drop zone.

--Aspect
thanks to mail2345 for randomized starting player
and for fixing up spawns



Game Options below
]]--

--[[
Reinforcement Number
CoalitionStandard = 1
RoninStandard = 2
DummyStandard = 3
CoalitionHeavy = 4
RoninHeavy = 5

SuperHeavy = 6
]]--
ReinforcementType = 2 --Corresponds to number in table above
--Incomplete, all but option 6 are finished.
--Time limit
timelimit = false --Set to false if you wish to play with only the goal limit
maxtime = 1200 --Amount of time until the match is over (in seconds)
--Goal limit
goaltimelimit = true --Set to false if you wish to play with only the time limit
maxgoaltime = 480 --Number of seconds needed to win
--Respawn Times
RespawnTimeDefense = 30000 --(in milliseconds, multiply seconds by 1000)
RespawnTimeOffense = 10000
--Starting Funds
DefenseStartFunds = 0 --(in oz. Gold)
OffenseStartFunds = 1000
--Money Rate
MoneyOn = false --Set to true if you wish to play with pensions
MoneyTimeDefense = 750 --(in milliseconds)
MoneyTimeOffense = 500
MoneyRateDefense = 1.5 --(in oz. Gold)
MoneyRateOffense = 2
--AI Moves to Zones
AI = false --Set to false if you wish to play manually
--Handicap? (in seconds)
p1score = 0
p2score = 0


what you want to do is go to the blue part and change that with one of the green values

aAs you can see, there are also options for turning AI mode on and off (it should be on (true) by default, I don't like to play that way, however)
You can also give yourself money. Or change spawn times. Or change the required time to win.


Wed Apr 29, 2009 2:23 am
Profile

Joined: Sun May 18, 2008 5:02 pm
Posts: 380
Location: Florida
Reply with quote
Post Re: King Assault Gamemode
I found the assault.lua thingy but it won't let me open it, only in winRAR will it ever open.
Is there something else I need to open it in the proper way?

EDIT: Problem found and solved, I can open it now.


Wed Apr 29, 2009 9:31 pm
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: King Assault Gamemode
i think im going to fiddle with the AI and try to make it a lot more agressive in its advances, if i get anything good i'll post it here. also, can you put exalion's .lua file in the file as "king assault mac" or something, its helpful when using mac resources or on a mac, you dont have to go searching for presets.


Thu Apr 30, 2009 1:23 am
Profile WWW
User avatar

Joined: Wed Jan 07, 2009 10:26 am
Posts: 4074
Location: That quaint little British colony down south
Reply with quote
Post Re: King Assault Gamemode
Hmmm.... would it be possible to make a one player version of this? I think all you'd really need is some Goto stances.... hmmm.... off to experiment.


Thu Apr 30, 2009 11:42 am
Profile WWW
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: King Assault Gamemode
there is one player, but its not that good. so i made a better one.
Attachment:
File comment: 1p king assault with random drops and better AI woooo
King Assault.rte.zip [84.55 KiB]
Downloaded 330 times
currently, its compatible with a slightly edited mac resources edition
-removing the nnn from the revolver cannnon presetname
(guys, why?) is necessary to play this version-
, but the logic parts should be portable to any version at all. i've also made them use any craft and also send in more reinforcements when playing offense, as well as a random reinforcements option (which is currently turned on) and a few other handy functions to cut down the code size )though i havnt used them everywhere)
enjoy.
Attachment:
File comment: things i dont like:
in this zone, the roof is too thin, so gibs leak in. also, the bots are given concrete guns as primary tools, this is a massive flaw. they think they are digging so they spray concrete everywhere. maybe make a side-tool slot aswell, with more 'nades in there aswell.
things i do like:
I'm winning.
The zones are set up in a way that makes defending actually ergonomic, also allows grenades to be used brilliantly.

ScreenDump000.png
ScreenDump000.png [ 167.62 KiB | Viewed 6930 times ]


Thu Apr 30, 2009 2:36 pm
Profile WWW
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: King Assault Gamemode
more edits, and now im stuck.
new DecideGotoZone function:
Code:
function DecideGotoZone(_szone,_set,_dstart)
   path = {}
   pzone = _szone
   --decides zone to go to
   while pzone == _szone do
   pzone = math.floor(math.random(0,3))
   end
   if pzone == 0 then
      zone = "Zone0"
   elseif pzone == 1 then
      zone = "Zone1"
   elseif pzone == 2 then
      zone = "Zone2"
   else
      zone = "Zone3"
   end
   print(zone)
   done = 0
   key = math.floor(math.random(1,#_set));
   while done == 0 do
   node = _set[key];
   print(node);
   table.insert(path,node);
   if node == zone then
      done = 1
   end
   _reset = _dstart[key];
   _dstart = _dstart[key];
   key = math.floor(math.random(1,#_reset));
   end
   return path;
end

and new iterators in the for loop:
Code:
            p1Zone0control = p1Zone0control + 1
            if movetimer:IsPastSimMS(1500) then
            if p1Zone0control >= 2 then
               actor:ClearAIWaypoints();
               path = DecideGotoZone(0,defz0,ddefz0)
               for count = 0, #path, 1 do
                  local waypoint = path[count];
                  local f = SceneMan.Scene:GetArea(waypoint);
                  actor:AddAISceneWaypoint(Vector(f:GetRandomPoint().X,f:GetRandomPoint().Y));
               end
               actor.AIMode = Actor.AIMODE_GOTO;
               print("success")
            end
            end
one thing is for sure, that "success" isnt printing <_<
tables of waypoints:
Code:
mho0a = { "MoveHubDefenseLZ0A","MoveHubOffense2A","MoveHubOffense0B" };
   dmho0a = { mhdlz0a,mho2a,mho0b };
   mho0b = { "MoveHubDefense1B", "MoveHubOffense0A"};
   dmho0b = { mhd1b, mho0a};
   mhdlz0a = { "MoveHubOffense0A", "MoveHubDefense0A"};
   dmhdlz0a = { mho0a, mhd0a};
   mhd0a = { "MoveHubDefenseLZ0A", "MoveHubDefense0B", "MoveHubDefense0C"};
   dmhd0a = { mhdlz0a, mhd0b, mhd0c};
   mhd0b = { "MoveHubDefense0A", "MoveHubDefense0C", "MoveHubDefenseZ1A"};
   dmhd0b = { mhd0a, mhd0c, mhdz1a};
   mhd0c = { "MoveHubDefense0A", "MoveHubDefense0B",
                "MoveHubDefenseZ0A", "MoveHubDefense2B"};
   dmhd0c = { mhd0a,mhd0b,mhdz0a,mhd2b }
   mhdz0a = { "MoveHubDefense0C", "MoveHubDefenseZ1A", "MoveHubDefense2C", "Zone0"};
   dmhdz0a = { mhd0c, mhdz1a, mhd2c, defz0};
   defz0 = { "MoveHubDefenseZ0A", "MoveHubDefenseZ1A", "Zone1"};
   ddefz0 = { mhdz0a, mhdz1a, defz1};
   mhdz1a = { "MoveHubDefense0B", "MoveHubDefenseZ0A", "MoveHubDefense1A"};
   dmhdz1a = { mhd0b, mhdz0a, mhd1a};
   defz1 = { "MoveHubDefenseZ0A", "MoveHubDefenseZ1A", "Zone0"};
   ddefz1 = { mhdz0a, mhdz1a, defz0};
   mhd1a = { "MoveHubDefenseZ1A", "MoveHubDefenseZ2A", "MoveHubDefense2B", "Zone2", "Zone3" };
   dmhd1a = { mhdz1a, mhdz2a, mhd2b, defz2, defz3 };
   mhd1b = { "MoveHubOffense0B", "MoveHubOffense1A"};
   dmhd1b = { mho0b, mh01a};
   mhdz2a = { "MoveHubDefense1A", "MoveHubOffense1A", "Zone2"};
   dmhdz2a = { mhd1a, mho1a, defz2};
   mho1a = { "MoveHubDefense1B", "MoveHubOffense2A", "MoveHubDefenseZ2A"};
   dmho1a = { mhd1b, mho2a, mhdz2a};
   mhd2a = { "MoveHubDefense2B", "MoveHubOffense2A", "Zone3"};
   dmhd2a = { mhd2b, mho2a, defz3};
   mhd2b = { "MoveHubDefense2C", "MoveHubDefense2A", "Zone3"};
   dmhd2b = { mhd2c, mhd2a, defz3};
   mhd2c = { "MoveHubDefenseZ0A", "MoveHubDefense2B"};
   dmhd2c = { mhdz0a, mhd2b};
   mho2a = { "MoveHubDefense2A", "MoveHubOffense1A", "MoveHubOffense0A"};
   dmho2a = { mhd2a, mho1a, mho0a};

now, can someone tell me what's wrong with this? as you can imagine from the piles of tables, there has been a lot of typing involved, and i'd like this to work out. now, heres the .rte with all the files, as well as the map of where the areas are (more work, but its been useful), can someone see if they can get it iterating through the pathfinding tables properly? for some reason it iterates 1-3 times and then drops out, and then halts the UpdateActivity function because of an error.
now, im going to sleep, i might get back on it in the morning if i can be assed, but i have music, maths and chemistry homework to get done, as well as a life to manage.. so it would be sweet if you could find out what the problem is. i bet i've just cocked up obviously somewhere, but its 337 am, so im off. night.


Attachments:
File comment: need help guys, though this should be fairly epic when its done.
King Assault.rte.zip [106.62 KiB]
Downloaded 320 times
Fri May 01, 2009 4:37 pm
Profile WWW

Joined: Sun May 18, 2008 5:02 pm
Posts: 380
Location: Florida
Reply with quote
Post Re: King Assault Gamemode
Hey Aspect, you should form a team that make King Assault maps.

You can ask for other scenes to put the Assault bunker on, like the famous map pack scenes. I bet you can even ask Gotcha! himself to help.


Sat May 02, 2009 3:33 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 69 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

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.115s | 17 Queries | GZIP : Off ]