miriyaka

miriyaka

Joined Member # 3401066
0 Posts 0 Replies 1,179 Reputation

You can just comment out any log messages in the stuff I give you once it's working how you like, unless there's a particular piece of info you want to keep in there for when you're balancing something.

458 Replies 1,463,657 Views

Ok, I got a few minutes to test and troubleshoot these things, and holy crap do FindBestBaseItem / FindBestCitadelUpgrade run often. Like, every 2-3 seconds. That means the old ShouldSave function was running about, uh, ~200 times per second, on average. This new SaveForUpgrade function only runs once per query per purchase type (twice every 2-3 seconds), and is much simpler. So hopefully that'll cut down a bit on AI sim excess for people with slower CPUs.

458 Replies 1,463,657 Views

Oh, I see the problem. InstantStatusFunction is used for some kind of action planning, but that can still be bypassed, in which case the ActionFunction is used to determine whether or not the ability is ready, and if so, to cast it. New AIAbilityUtilities.lua: http://pastebin.com/32eaepJp Keep the InstantStatusFunctions how they are, and point each action's ActionFunction toward AIAbility.SummonActionFunction as well.

458 Replies 1,463,657 Views

[quote who="OMG_pacov" reply="53" id="2953495"]quick note, though. I hooked AIAbilityUtilties as a standalone file. Should I not have done that. Here is EXACTLY what I have in AiAbilityUtilizies:[/quote] That's fine, that's how that was meant to be used. [quote who="OMG_pacov" reply="57" id="2953692"]been toying around with the qot code a bit more. I've now got it to the point where the log is outputing the summonstatus function info. Its even successfully counting

458 Replies 1,463,657 Views

[quote who="OMG_pacov" reply="45" id="2953249"]oh, and I had to modify... Then point QoT's 'Shambler' AIAction's InstantStatusFunction (/lua/units/heroes/HQueen/HQueen_AIActions.lua) at that, instead of DefaultStatusFunction: ... That's the only way it gets called properly and outputs to the log, but I'm getting the error you mentioned. I wonder if its getting a null value right off the bat as none exist.[/quote] That's because it's a st

458 Replies 1,463,657 Views

Ok, I spent about an hour on a yet-untested system for re-working upgrade save priorities that is far, far simpler, and easier to extend. It's linear, and doesn't take into account the ability to purchase an upgrade further down the map/queue when one at the top is yet unpurchased, but this works fine when just taking into account a low level upgrade like Currency I, and a bunch of sequential upgrades like the creep adds. This behavior is modifiable, but I figured it's

458 Replies 1,463,657 Views

That's somewhat complicated. There's a lot of disassociation between the HeroAIActionTemplate that provides the blueprint for the ability use, and a weight calculation function, and the actual checking/execution of the ability itself. I guess it wouldn't be difficult to create a SummonStatusFunction in /lua/sim/AI/AIAbilityUtilities.lua that can check the ability level and max summons, and point each hero's summon actions' InstantStatusFunction at that, inste

458 Replies 1,463,657 Views

Peppe put in a ton of overrides because actually making the AI behave properly w/r/t shopping would require a full re-write of the shopping system, like I said. Some of the things he did could have been centralized a bit more, but again, doing things 'properly' often takes a lot more time, and he already didn't have enough time to fully refine it. Notice that none of the code in the mod is hooked at all. Yes, the Oculus and Rook blueprint merges are covered in

458 Replies 1,463,657 Views

That's kind of a weird feature to have in a mod - if you don't want to chat, don't chat. If you're so angry that you're chatting even when you don't think you should be, then you're probably not going to be deterred from turning your ability to chat back on anyway. If you're dead set on crippling your ability to send chat messages, I guess you can comment out the entire 'else' block in the mod's bp.edit.OnEnterPressed override that act

19 Replies 97,568 Views

[quote who="OMG_pacov" reply="24" id="2952606"]OK. I'll look into this. Thanks. On the other side of things, though, at least whatever code he wrote does work... hopefully its something that can be refined. I'm not exactly sure how to write it so that it would be restricted to checking each shopping trip, though. When you say once per available upgrade - what does that mean in practice? [/quote] Each time an AI considers making a shopping trip, it runs every priority function

458 Replies 1,463,657 Views

[quote who="OMG_pacov" reply="19" id="2952144"]But even if I go that route, you are saying that would also likely be way too cpu intensive? Believe me - I'd rather not take all the time only to have it bog the systems down and be a mess.[/quote] As long as you keep the conditions simple, and don't apply them to every single item, it should be ok. Checking AI difficulty is an extremely simple check, as is game time, so those kinds of things are fine. The main prob

458 Replies 1,463,657 Views

Even if I allowed you to mute yourself, other people would still be able to see what you typed, regardless of whether or not they have the mod installed. If you include the mod in the Enhanced AI package, just make note of the /? help command somewhere in the description so people can figure out how to use it in-game.

19 Replies 97,568 Views

There is no catch-all way to do what you're trying to do short of having hundreds of exceptions in each item priorityfunction. This is a bad idea, both because this would be a ton of work and because these functions are run quite often. If each of them is doing a dozen checks, you just added a lot of extra CPU work to the AI. The citadel upgrade priorityfunctions are already a bit ridiculous, and the whole system really needs to be re-architected, but that would take a l

458 Replies 1,463,657 Views

Adding that to the actual scoreboard would probably be easier. Take a look at HUD_scoreboard (and the in-game scoreboard itself), and see if you can find a way to fit in another 5 digits plus parentheses or brackets next to the war score.

12 Replies 8,074 Views

No, this only affects the edit bar. I'm open to suggestions, but I'm not too keen on doing anything really complicated like adding new UI windows for editing the things this mod allows to be changed via chat commands. The reason I integrated it into the chat is because that took comparatively little effort, and everything it does is at least related to the chat system, and didn't require me to spend hours and hours learning about window controls.

19 Replies 97,568 Views

I moved the ToggleChat() call when enter is pressed into both the command condition and chat condition respectively, and didn't notice that it was also being called when there was no text at all. Adding this below line 84 in chat.lua fixes that:[code="c++"] else ToggleChat()[/code]Make sure that else lines up with the 'if text ~= "" then' line above, and with the

19 Replies 97,568 Views

Well, it is now: http://code.google.com/p/nubletsupreme/downloads/detail?name=ChatLog.zip Again, this doesn't hand you the chat on a silver platter, but it's the best that can be done without using an external tool to monitor memory or the log file. The easiest way to save the chat is to use the log window (/showlog) and the custom filter with '[CHAT]', using CTRL+A and CTRL+C

19 Replies 97,568 Views

100% not possible. For very important security reasons, the game does not allow lua to just write to whatever files on disk it so pleases, and only the engine itself handles disk writing, making only two internal methods available to lua: preferences and log. Preferences is great for saving things, but not so great for logging huge amounts of text. The log works fine for that, but you just need a tool to sort through it, or you need to get used to running the game with the l

19 Replies 97,568 Views

Let it sit for a few days at least. It's right at the top of the forum, and people who are interested can certainly try it out for now. I wrote it in a few hours and probably didn't test every angle, and I'm not sure whether or not I want to add to it yet.

24 Replies 7,818 Views

[quote who="OMG_pacov" reply="18" id="2951222"]sorry - just to quickly backtrack, though - do we have access to the enemies current level or nah? Apologies if you covered this... I have an amazing knack for missing things you say miri and then seeing them immediately after i post. Anyway, if this is doable, can you assist with this bit of code? I'm not looking for the ui piece, just math to make it happen.[/quote] Yes, it is, just not directly from the user unit object

21 Replies 8,322 Views

The average log for a full game is about 3000-6000 lines. So without a tool to pull out lines starting with [CHAT], you're limited to using the log window (/showlog), filtering by that string, and copy-pasting. Oh, and the game will erase and re-start the log file every time it starts up (not every game, just every app start). So if you really want to save the chat messages (or anything else in a log), you need to do it right after you exit.

24 Replies 7,818 Views

Thanks for testing it. Good to hear that it works with players - it took jumping through a lot of hoops to test it with bots, and obviously in a normal game I don't want bots to show up on the player list nor be ignorable. I'm not sure how much I'll expand it at this point, I guess it depends on how badly people want built-in offline list addition/removal, or what other similar features I or others can think of - chat size and timeout were obvious, because I found bo

24 Replies 7,818 Views

[quote who="OMG_pacov" reply="11" id="2950914"]When you say overriding that, that's when I'd name a function the exact same thing as its called in the dgdata.zip and program it "again" in the lua? I have that right?[/quote] Right. Technically a hook is also an override, in that you're hijacking the name of the original function, the difference being that you're saving and calling the existing version of that function. [quote who="OMG_pacov"

24 Replies 7,818 Views

[quote who="OMG_pacov" reply="9" id="2950858"]So, what you refer to as destructive is if I completely overwrite something in a mod that exists in the dgdata.zip? eg if a fuction called bob exists in the dgdata.zip and I reprogram that function in the modded lua (eg I reprogram the function bob by just directly recoding it and calling it bob). then that's destructive? Am I following you?[/quote] More or less, yes. If, for example, your hook is a copy of an original file with

24 Replies 7,818 Views

Every time the engine executes a file from dgdata.zip, it looks in each mod's /hook folder for a file with a corresponding path and name, appends it to the original and executes it as one chunk. So anything that's in the original file does not need to be included in a hook, as it's already still there. The mod hooks of the file just add onto the end of the same file, and everything in the original is accessible, including any local variables declared in the main block

24 Replies 7,818 Views