|
 |
| Author |
Message |
|
brandon007
|
Posted: 08 Jul, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
|
| Top |
|
 |
|
Domino
|
Posted: 08 Jul, 2011
|
|
Joined: 26 Feb, 2009 Posts: 2997
|
ok, now were making progress.. ok in your factions units blueprints.. does the General.FactioName entry say Code: FactionName = 'WORDOFBLAKE',
_________________ Domino. ______________
|
|
| Top |
|
 |
|
Domino
|
Posted: 08 Jul, 2011
|
|
Joined: 26 Feb, 2009 Posts: 2997
|
|
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 |
|
 |
|
brandon007
|
Posted: 08 Jul, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
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 |
|
 |
|
Mithy
|
Posted: 08 Jul, 2011
|
|
Joined: 19 Jul, 2009 Posts: 2972
|
|
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 |
|
 |
|
Domino
|
Posted: 08 Jul, 2011
|
|
Joined: 26 Feb, 2009 Posts: 2997
|
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 |
|
 |
|
brandon007
|
Posted: 08 Jul, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
|
Thanks guys =p If it works, Ill be sure to send you both the beta when its playable =p
|
|
| Top |
|
 |
|
brandon007
|
Posted: 08 Jul, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
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:  Any idea what might be doing this? The Beams were working before I changed the FactionName X-x
|
|
| Top |
|
 |
|
Domino
|
Posted: 08 Jul, 2011
|
|
Joined: 26 Feb, 2009 Posts: 2997
|
|
well change the name back and see if adjacency works right then, just to be sure..
_________________ Domino. ______________
|
|
| Top |
|
 |
|
brandon007
|
Posted: 08 Jul, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
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 |
|
 |
|
Domino
|
Posted: 08 Jul, 2011
|
|
Joined: 26 Feb, 2009 Posts: 2997
|
|
you said our changes caused A NEW error, lol..
well post the error your getting now.. gawd!
_________________ Domino. ______________
|
|
| Top |
|
 |
|
brandon007
|
Posted: 08 Jul, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
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 |
|
 |
|
Domino
|
Posted: 08 Jul, 2011
|
|
Joined: 26 Feb, 2009 Posts: 2997
|
|
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 |
|
 |
|
brandon007
|
Posted: 08 Jul, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
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 |
|
 |
|
Domino
|
Posted: 08 Jul, 2011
|
|
Joined: 26 Feb, 2009 Posts: 2997
|
|
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 |
|
 |
|
brandon007
|
Posted: 08 Jul, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
|
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 |
|
 |
|
brandon007
|
Posted: 09 Jul, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
|
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 |
|
 |
|
Mithy
|
Posted: 09 Jul, 2011
|
|
Joined: 19 Jul, 2009 Posts: 2972
|
|
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 |
|
 |
|
brandon007
|
Posted: 09 Jul, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
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 |
|
 |
|
Mithy
|
Posted: 09 Jul, 2011
|
|
Joined: 19 Jul, 2009 Posts: 2972
|
|
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 |
|
 |
|
brandon007
|
Posted: 09 Jul, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
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 |
|
 |
|
Mithy
|
Posted: 09 Jul, 2011
|
|
Joined: 19 Jul, 2009 Posts: 2972
|
|
So, are you sure your faction is factionindex 5?
|
|
| Top |
|
 |
|
brandon007
|
Posted: 09 Jul, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
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 |
|
 |
|
Mithy
|
Posted: 09 Jul, 2011
|
|
Joined: 19 Jul, 2009 Posts: 2972
|
|
Then add log messages into that function that list the brain nickname, faction index, and faction name each time it's run.
|
|
| Top |
|
 |
|
brandon007
|
Posted: 09 Jul, 2011
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
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 |
|
 |
 |
 |
|