Login  Register
 



Post new topicReply to topic Go to page Previous  1, 2, 3, 4, 5 ... 10  Next
 
Author Message
 PostPosted: 08 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
Ah I see, heres the new log:

http://pastebin.com/gMpzhvA5


Top
 Profile  
 PostPosted: 08 Jul, 2011 
 

Joined: 26 Feb, 2009
Posts: 2996
Offline
ok, now were making progress..

ok in your factions units blueprints..

does the General.FactioName entry say

Code:
FactionName = 'WORDOFBLAKE',

_________________
Domino.
______________


Top
 Profile  
 PostPosted: 08 Jul, 2011 
 

Joined: 26 Feb, 2009
Posts: 2996
Offline
also repr(Factions.FactionIndexMap) just to make sure your faction is in this table.. seeing as were referrancing this table.

it should return something similar to the first LOG we did.. your factions index will be in there..

_________________
Domino.
______________


Top
 Profile  
 PostPosted: 08 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
Domino wrote:
ok, now were making progress..

ok in your factions units blueprints..

does the General.FactioName entry say

Code:
FactionName = 'WORDOFBLAKE',

I got all the Faction units Blue Prints with 'Word of Blake'

Is that were Im going wrong? It has to be WORDOFBLAKE rather than Word of Blake?


Top
 Profile  
 PostPosted: 08 Jul, 2011 
 
User avatar

Joined: 19 Jul, 2009
Posts: 2972
Offline
Well, what is that code doing with bp.General.FactionName? It's using it to look for a key in the FactionIndexMap, which is based on the 'Key' value in your faction table ('wordofblake'). It's doing a string.lower, so the case doesn't matter (at least in the bp), but it has to match that key value otherwise.


Top
 Profile  
 PostPosted: 08 Jul, 2011 
 

Joined: 26 Feb, 2009
Posts: 2996
Offline
I did it the long way with him to make him log and traverse the tables in his error function, to make him understand the problem, rather than just give him the answer... after all it is brandon!!!! lol i think we could all see that the problem was either, his faction wasnt being inserted into factions.lua OR he wasnt using the correct FactionName in the units blueprint..

your best off keeping the same CASE as the other factions use.. there "could be" another function somewhere that uses the FactionName as it is in the blueprint.. obviously for this function the function does a string.lower because the case in the indextable is lowercase.. but that doesnt mean to say that all other functions will do this.. if its lower in all other blueprints, then do yours lower also, if its caps do yours caps, if its got a first cap letter, does yours with a first cap letter.. :)

lets just hope he learned a little today :)

_________________
Domino.
______________


Top
 Profile  
 PostPosted: 08 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
Thanks guys =p If it works, Ill be sure to send you both the beta when its playable =p


Top
 Profile  
 PostPosted: 08 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
Good news and Bad news. Veterancy works now, but it also caused a new problem.

The Building adjecency beams wont work right anymore X-x I changed the lines in Effect Utilities to match the changes I made in the Unit BPs... But now I get this:
Image

Any idea what might be doing this? The Beams were working before I changed the FactionName X-x


Top
 Profile  
 PostPosted: 08 Jul, 2011 
 

Joined: 26 Feb, 2009
Posts: 2996
Offline
well change the name back and see if adjacency works right then, just to be sure..

_________________
Domino.
______________


Top
 Profile  
 PostPosted: 08 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
Domino wrote:
well change the name back and see if adjacency works right then, just to be sure..

It doesnt work at all when I change it back. It works like that when its wordofblake, but when its Word of Blake, like I used to have it, I just get an Error.


Top
 Profile  
 PostPosted: 08 Jul, 2011 
 

Joined: 26 Feb, 2009
Posts: 2996
Offline
you said our changes caused A NEW error, lol..

well post the error your getting now.. gawd!

_________________
Domino.
______________


Top
 Profile  
 PostPosted: 08 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
Domino wrote:
you said our changes caused A NEW error, lol..

well post the error your getting now.. gawd!

I posted the picture of it XD lolz (w/ wordofblake)

But this is the error I get when I use the old one (w/ Word of Blake)

Code:
WARNING: Error running lua script: attempt to use as string a nil value
         stack traceback:
            [C]: in function `SetMesh'
            ...ed alliance\gamedata\lua.scd\lua\effectutilities.lua(2533): in function <...ed alliance\gamedata\lua.scd\lua\effectutilities.lua:2154>
WARNING: Error running lua script: attempt to use as string a nil value
         stack traceback:
            [C]: in function `SetMesh'
            ...ed alliance\gamedata\lua.scd\lua\effectutilities.lua(2533): in function <...ed alliance\gamedata\lua.scd\lua\effectutilities.lua:2154>


Top
 Profile  
 PostPosted: 08 Jul, 2011 
 

Joined: 26 Feb, 2009
Posts: 2996
Offline
ok now im confused,

is the previous error fixed?

if so why are you posting an error from the previous none working vet error..

_________________
Domino.
______________


Top
 Profile  
 PostPosted: 08 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
Domino wrote:
ok now im confused,

is the previous error fixed?

if so why are you posting an error from the previous none working vet error..

The Veterancy problem was fixed. This problem came up since I had to change the FactionName = 'Word of Blake' to FactionName = 'wordofblake' in all the units BPs.


Top
 Profile  
 PostPosted: 08 Jul, 2011 
 

Joined: 26 Feb, 2009
Posts: 2996
Offline
well your gonna have to paste the function where the problem resides.. its in one of your own functions you have hooked into effectutilities.lua ..

_________________
Domino.
______________


Top
 Profile  
 PostPosted: 08 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
Ah, Its ok, I just figured out where I went wrong XD I changed one part of EffectUtilities, but not another part that was calling on the previous function I put in XD

Silly me =p

I think that fixes up all the problems now =o

Want me to fire the Beta over to ya?


Top
 Profile  
 PostPosted: 09 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
Ok, I have tried doing this on my own, and it seems I cant T_T

Anyone know how Prebuilt bases work? Im trying to add in support for that for my new faction. I think I might of edited aibrain.lua wrong X-x

Anyone got any ideas?


Top
 Profile  
 PostPosted: 09 Jul, 2011 
 
User avatar

Joined: 19 Jul, 2009
Posts: 2972
Offline
As usual, provide a log, show your work, etc. We can't help you if we don't know what you've tried or what you might have done wrong.


Top
 Profile  
 PostPosted: 09 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
No errors show up in the log. But I did add this to aibrain.lua

Code:
        elseif factionIndex == 5 then
         resourceStructures = { 'UWB1103', 'UWB1103', 'UWB1103', 'UWB1103' }
         initialUnits = { 'UWB0101', 'UWB1101', 'UWB1101', 'UWB1101', 'UWB1101' }


Its the only part of all the lua files that I could find pretaining to Prebuilt bases. I think Im missing something...


Top
 Profile  
 PostPosted: 09 Jul, 2011 
 
User avatar

Joined: 19 Jul, 2009
Posts: 2972
Offline
Ignoring for a moment that your faction isn't necessarily faction 5, have you actually logged the function you're overriding to confirm that it's running at all? Have you confirmed that other players in the game have pre-built bases showing up? If so, post or pastebin your entire AIBrain hook (assuming it's not a total overwrite - if it is, then post only the whole function, then kill yourself).


Top
 Profile  
 PostPosted: 09 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
Mithy wrote:
Ignoring for a moment that your faction isn't necessarily faction 5, have you actually logged the function you're overriding to confirm that it's running at all? Have you confirmed that other players in the game have pre-built bases showing up? If so, post or pastebin your entire AIBrain hook (assuming it's not a total overwrite - if it is, then post only the whole function, then kill yourself).
It runs just fine. Other bases are prebuilt. Its only with my faction...

As for Non-destructivly hooking it, Im unsure as to how to do that exactly, but heres the function anyways. http://pastebin.com/Rjkj8Mkf


Top
 Profile  
 PostPosted: 09 Jul, 2011 
 
User avatar

Joined: 19 Jul, 2009
Posts: 2972
Offline
So, are you sure your faction is factionindex 5?


Top
 Profile  
 PostPosted: 09 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
Mithy wrote:
So, are you sure your faction is factionindex 5?

Thats the thing. I have no idea wether or not my Word of Blake faction is registered as #5...


Top
 Profile  
 PostPosted: 09 Jul, 2011 
 
User avatar

Joined: 19 Jul, 2009
Posts: 2972
Offline
Then add log messages into that function that list the brain nickname, faction index, and faction name each time it's run.


Top
 Profile  
 PostPosted: 09 Jul, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
Mithy wrote:
Then add log messages into that function that list the brain nickname, faction index, and faction name each time it's run.

Brain nickname?... How would I go about logging that stuff?


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



Quick Tools

Search for:
Jump to:  
cron

© 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