Login  Register
 



Post new topicReply to topic Go to page Previous  1, 2, 3  Next
 
Author Message
 PostPosted: 27 Jul, 2008 
 
User avatar

Joined: 01 May, 2007
Posts: 4219
Offline
Saw the following error reported last night...
Code:
WARNING: Error running lua script: attempt to use as number a nil value
         stack traceback:
            [C]: in function `VDist2Sq'
            ...liance\gamedata\lua.scd\lua\ai\aiattackutilities.lua(2430): in function `SendPlatoonWithTransportsSorian'
            ...liance\gamedata\lua.scd\lua\ai\aiattackutilities.lua(2201): in function `AIPlatoonSquadAttackVectorSorian'
            ...r - forged alliance\gamedata\lua.scd\lua\platoon.lua(5121): in function <...r - forged alliance\gamedata\lua.scd\lua\platoon.lua:4937>

_________________
Image
Blackhole http://www.youtube.com/watch?v=B3aDT0Ft_Yg
WOFhttp://www.youtube.com/watch?v=FVqMqz8PgEc
FOD http://www.youtube.com/watch?v=be9cu9UHv-U
TML http://www.youtube.com/watch?v=1Apk08LAtxc


Top
 Profile  
 PostPosted: 27 Jul, 2008 
 
User avatar

Joined: 28 Feb, 2007
Posts: 4122
Location: Marysville, WA USA
Offline
Some unit probably died at just the right time. I'll take a look.

No, I did not see that unit, but I had it in the UnitList table wrong at the time.

_________________
Image


Top
 Profile  
 PostPosted: 01 Aug, 2008 
 
User avatar

Joined: 11 Apr, 2007
Posts: 1915
Offline
Enlightments need:

Data structure in /lua/basetemplates.lua looks a bit weird to my eyes, especialy the one of the table named BaseTemplates.

Code:
BaseTemplates
+- faction
|   |
|   +- subtable #1
|   |  +- Building List, essentialy resources, intel and some basic defenses
|   |  +- lots of {x,z,y} relative location coordinates (ODD, even, zero)
|   |
|   +- subtable #2
|      +- Building List, essentialy factories and most of the defenses
|      +- lots of {x,z,y} relative location coordinates (even, ODD, zero)
|
+- next faction
(etc.)


I need some explanations on those "offsets" that are grouped in TWO different coordinates lists made of (odd, even) in the 1st table, and (even, odd) in the 2nd table.

This is a problem for me because the mod I'm working on features non standard sized buildings.
(some are rectangles, some are much smaller than the smallest original ones)

On the other hand I want to be totally sure of HOW the buildings will be constructed in order to make my own base template.

For now my AI works almost well, that is:
- it manages a supplementary tech level (Tech 0.5) that preceeds all of the other tech levels + the new units.
- it almost manages higher tier factories that don't upgrade anymore. ( TA-like upgrading )

Your help will be much apreciated.

_________________
Console Plus - Solo A.C.U. - Experimental Wars Image


Last edited by Manimal on 01 Aug, 2008, edited 1 time in total.

Top
 Profile  
 PostPosted: 01 Aug, 2008 
 
User avatar

Joined: 28 Feb, 2007
Posts: 4122
Location: Marysville, WA USA
Offline
To add unit support there is no reason to look in BaseTemplates.lua. Just the files in lua\AI\PlatoonTemplates\ and lua\BuildingTemplates.lua.

_________________
Image


Top
 Profile  
 PostPosted: 01 Aug, 2008 
 
User avatar

Joined: 11 Apr, 2007
Posts: 1915
Offline
sorian wrote:
To add unit support there is no reason to look in BaseTemplates.lua. Just the files in lua\AI\PlatoonTemplates\ and lua\BuildingTemplates.lua.


err... my question is about Buildings and Base Templates.

I already made modifications on almost all files such a AI (44 files), Editor (4 files), Templates (all), SIM (2 files), AIbrain, etc.

On the top I've double checked everything !

The AI builds up everything at tier 0 but the very first Mex (weird!) and almost everything at tier 1, it upgrades Mexes from Tech0 to Tech 3, it adds storage adjacent to Mexes but not yet adjacent to Pgens, Ai builds up agressive units of all kind, ... and so on...

My AI mod doesnt throw errors in the Log file.

I noticed that it orders way too many engies (I can solve that)
Once I've even seen the AI building up a T2 factory + TacML but it never did that again.. :s

For now I'm using the same build conditions as the ones of tier 1 templates. I think I'd need to adjust them in the templates -among others adjustments- so that AI can tech up more quickly.

Knowing how the engine looks for a location in BaseTemplates would help me in understanding why it won't build up sometimes at the closest locations + the next tier factories.

I could send you a "demo" version so that you could see what I mean.

EDIT:
I found some solutions that partly fix up my problems.
However it still takes the AI ages for tech-ing up to Tier 2 (it's never reached Tier 3)

_________________
Console Plus - Solo A.C.U. - Experimental Wars Image


Top
 Profile  
 PostPosted: 16 Aug, 2008 
 

Joined: 02 Jan, 2008
Posts: 115
Offline
Hi

A quick question I have been looking at some mods to add support for AI now I understand what to do for units *I think :D * but my question is for a building its just a hydro plant the bit am unsure about is how do you make the AI upgrade it?

Thanks
Fluff


Top
 Profile  
 PostPosted: 16 Aug, 2008 
 
User avatar

Joined: 28 Feb, 2007
Posts: 4122
Location: Marysville, WA USA
Offline
Didn't think about upgrades. Have to look into that.

_________________
Image


Top
 Profile  
 PostPosted: 19 Aug, 2008 
 

Joined: 02 Jan, 2008
Posts: 115
Offline
Thanks no rush tho :D


Top
 Profile  
 PostPosted: 19 Aug, 2008 
 
User avatar

Joined: 01 Mar, 2007
Posts: 1999
Location: Perth, Western Australia
Offline
fluffa wrote:
Thanks no rush tho :D


Nothing to add... just found the name "fluffa" ROFL funny ;-)

_________________
My Mods:
SC - Duel AI, Close-up Camera, Alternative Music Order
FA - AI patch, Air/Land/Naval AI, Null AI, Swarm AI, AIAllyControl, Base Assault, Return to Fabs Balance Patch
SC2 - Research log in replays, Mass Extractor Balance.


Top
 Profile  
 PostPosted: 19 Aug, 2008 
 

Joined: 02 Jan, 2008
Posts: 115
Offline
duncane wrote:
fluffa wrote:
Thanks no rush tho :D


Nothing to add... just found the name "fluffa" ROFL funny ;-)


:lol:


Top
 Profile  
 PostPosted: 19 Aug, 2008 
 

Joined: 02 Jan, 2008
Posts: 115
Offline
Hi Sorian

Just had a game on a 20x20 map one I play alot with err... Hawks black ops mod :lol: . Now the mod seems to work ok and your AI was building the units all good :D . However my question is with the bit of code etc they need to do would this affect any of your sim speed stuff with factorys etc, I only ask cos the last game when to -8 :? . I have played this map many many times and worse before was -4.

Thanks
Fluff


Top
 Profile  
 PostPosted: 28 Aug, 2008 
 
User avatar

Joined: 11 May, 2007
Posts: 435
Offline
Thanks Sorian! Everything works great.

Question: Your current system doesn't allow for units that upgrade (such as custom factories). That table is found in Building Templates.lua at the bottom.

EX:
Code:
RebuildStructuresTemplate = {
    # UEF
    {
        # factories
        {'ueb0201', 'ueb0101',},
        {'ueb0202', 'ueb0102',},
        {'ueb0203', 'ueb0103',},
        {'ueb0301', 'ueb0101',},
        {'ueb0302', 'ueb0102',},
        {'ueb0303', 'ueb0103',},
        # extractors
        {'ueb1202', 'ueb1103',},
        #radar
#        {'ueb3104', 'ueb3101',},
#        {'ueb3201', 'ueb3101',},
    },
},


Is there anyway you could include a rebuild functionality to your UnitList table?

Thanks again,
Mangriff

**EDIT** actually that is prolly not the upgrade stuff, more likely the rebuild stuff. Oh well, upgrading still isn't working for me :(

_________________
Veni Vidi Vici


Last edited by mangriff on 28 Aug, 2008, edited 1 time in total.

Top
 Profile  
 PostPosted: 28 Aug, 2008 
 
User avatar

Joined: 28 Feb, 2007
Posts: 4122
Location: Marysville, WA USA
Offline
I will look into it.

_________________
Image


Top
 Profile  
 PostPosted: 10 Sep, 2008 
 

Joined: 09 Apr, 2008
Posts: 17
Offline
Did you have the time to look into it?

I too would like to see AI upgrading buildings.

Really appriciate the stuff you made :P.


Top
 Profile  
 PostPosted: 23 Nov, 2008 
 
User avatar

Joined: 09 Aug, 2007
Posts: 984
Offline
Is custom faction support still being worked on?

_________________
db


Top
 Profile  
 PostPosted: 24 Jan, 2009 
 
User avatar

Joined: 22 May, 2008
Posts: 182
Location: Swe
Offline
Why hasn't this been stickied?


Top
 Profile  
 PostPosted: 24 Jan, 2009 
 
User avatar

Joined: 28 Feb, 2007
Posts: 4122
Location: Marysville, WA USA
Offline
@AlteMann: Not sure if it should be stickied. It is linked in my AI thread.

@Raevn: I know, been a while. I have some of the base stuff done for custom factions. Just waiting on a mod to be released to require me to finish it.

_________________
Image


Top
 Profile  
 PostPosted: 25 Jan, 2009 
 

Joined: 01 Jan, 2009
Posts: 2
Offline
Me and my friend have been playing against AI's for a while, but sometimes we'd use the T4 Shields (custom unit obviously). Now we'd like the AI to be able to make this to even things out some more.

I'v been trying to figure out howto add support for it into this mod, but i cant for the life of me figure out how. So far i'v figured out the unit names are:

Code:
'XUAB4301',
'XUEB4301',
'XURB4207',
'SCHSE4',


But i cant figure out what exactly to put into the file thats supposed to go into the /lua directory in the mod. This mod did not have BuildingTemplates.lua file anywhere.

Any help is appreciated


Top
 Profile  
 PostPosted: 08 Apr, 2009 
 

Joined: 03 Jun, 2007
Posts: 793
Offline
I am trying to add AI support for several categories of custom units, and not sure which platoons to use:

T4 shields: No category currently exists for siege shields, is it possible to add this type of unit?

T3 PD: Since this only exists currently for UEF, can I just use UEF's category with 100% replacement? Only the appropriate faction would build the unit.

T3 Engineering Stations: Can I use the existing categories for the engineering stations that exist?

T2 & T3 Mass/Energy Storage: Could I use the same category as the T1 storage, or would this fail because it's not T1? Any other thoughts?

Anti-Satellite weapon: I currently have this built only by Seraphiim. Could I use the satellite platoon from UEF?

Thanks for any help regarding these.


Top
 Profile  
 PostPosted: 09 Apr, 2009 
 
User avatar

Joined: 28 Feb, 2007
Posts: 4122
Location: Marysville, WA USA
Offline
All of that would fail, unfortunately.

_________________
Image


Top
 Profile  
 PostPosted: 09 Apr, 2009 
 

Joined: 03 Jun, 2007
Posts: 793
Offline
How was the T3 mobile anti-air accomplished? Since there were no units for that category initially, did a new platoon have to be created? Can I create a new platoon for these categories as well?


Top
 Profile  
 PostPosted: 09 Apr, 2009 
 
User avatar

Joined: 28 Feb, 2007
Posts: 4122
Location: Marysville, WA USA
Offline
There was a platoon for that category, it was just set up to build T2 AA.

_________________
Image


Top
 Profile  
 PostPosted: 09 Apr, 2009 
 

Joined: 03 Jun, 2007
Posts: 793
Offline
So no hope on any of those units? Bummer...oh well, thanks for the reply.


Top
 Profile  
 PostPosted: 09 Apr, 2009 
 
Forum Scout
Forum Scout

Joined: 16 Feb, 2007
Posts: 2839
Location: Phoenix, Arizona, USA
Offline
Hey sorian I figured I would let you know (though I dout you will mind) that I am rewriting my old modding tutorial over the next cpl weeks and was going to incorporate this into it as part of the basic setup process for custom units.

That way like a few other things that are commonly used in mods now it will get new modders into a habit of learnign about it and using it while they are still learning how to mod rather then after the fact. :)


Top
 Profile  
 PostPosted: 13 Apr, 2009 
 
User avatar

Joined: 10 Mar, 2007
Posts: 723
Offline
fluffa wrote:
Hi Sorian

Just had a game on a 20x20 map one I play alot with err... Hawks black ops mod :lol: . Now the mod seems to work ok and your AI was building the units all good :D . However my question is with the bit of code etc they need to do would this affect any of your sim speed stuff with factorys etc, I only ask cos the last game when to -8 :? . I have played this map many many times and worse before was -4.

Thanks
Fluff
I have found that unless a map is meticulously set up with properly connected ai markers in all the right places it will cause massive sim speed hits as the game progresses. Even the totaly flat maps will cause the sorian ai to spaz out if there are not enough markers to tell it what to do with all the units it builds.

Something you might want to do with maps that lag for you late game is to use Hazard X's marker editor and see if there are any ai markers. If there are none then its pretty self evident with the marker popup descriptions to figure out what they do so take a bit of time and set some up and see if it helps.


Lost Island II before the markers were added was a total wash for the ai and it would go into the negative sim speed within minutes and all the units would just idle about not doing much of anything. After I fiddled with it for a while it finally became playable with 3 aix with 1500 units each at about -2 at end game. Here are some before and after shots.

Lost Island II stock.
Image


Lost Island Ai enabled.
Image


Well good luck fluffa and thank you sorian for keeping Sup Coms ai alive and well so I can enjoy all these wonderful maps and mods that are overflowing here. :)


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic Go to page Previous  1, 2, 3  Next



Quick Tools

Search for:
Jump to:  

© 2002-2010 Gas Powered Games Corp. All Rights Reserved. Gas Powered Games is the exclusive trademark of Gas Powered Games Corp.
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
 
Home| Games | Company | News & Press | Support
  Terms of Use   |    Copyright Information   |    Privacy Policy