Is it possible to add new ai scripts from the ares development as a user - i tried it within the config, it shows in the editor but shuts itself down upon trying to reopen it:
67=Enter Vehicles,NoTypes,Instructs the taskforce to enter the nearest vehicles.
"Error occured at ScriptType: xxxxxxx Please verify its format. Application will now close."
..
Edit: turns out you got to have no empty IndexNumbers, so if you want to add 67, 66 and 65 must be added first. QUICK_EDIT
Changes:
- Double click on boolean fields to toggle their values (Credits: Askeladd)
- AITrigger UI fields re-ordered for better readability (Credits: Askeladd)
- Script action types from config file is now parsed based on its ID instead of its array index
- YR config file updated with Ares script action additions of IDs from 65 to 70
Attaching the updated version and the source code changes over the current github version.
I noticed the "Number" value type is limited to 100. This is problematic, for example in a situation where I need to specify a team number greater than 100 (I need units to switch between teams, and I have well over 100 TeamTypes). _________________
I noticed the "Number" value type is limited to 100. This is problematic, for example in a situation where I need to specify a team number greater than 100 (I need units to switch between teams, and I have well over 100 TeamTypes).
That is silly...
Code:
AI Totals:
Taskforces:315
Scripts:206
TeamTypes:517
Triggers:807
I uploaded a new version (see first post) with some improvements to the UI that should make it easier to maintain an overview of your team- and triggertypes.
Quote:
Version 2.0.4.2:
- Added columns showing House, Max and Priority to Team Types tab.
- Added columns showing Side, Tech Level, Easy, Medium and Hard to Trigger Types tab.
Nice. Adding columns in the left panel allows to sort those TeamTypes/AITriggers for comparison/analysis.
Some columns could be more useful than others for the users like IsBaseDefense on TeamType or Initial Weight on AITriggers. House on TeamType isn't useful in AI.ini as game would ignore it and use country/side from AITrigger for producing teams from factories. It is useful in SP maps like when recruiting pre-placed units from the map. People could still use it for sorting as vanilla TS has GDI/Nod for House, YR has <none> there. QUICK_EDIT
Nice. Adding columns in the left panel allows to sort those TeamTypes/AITriggers for comparison/analysis.
Some columns could be more useful than others for the users like IsBaseDefense on TeamType or Initial Weight on AITriggers. House on TeamType isn't useful in AI.ini as game would ignore it and use country/side from AITrigger for producing teams from factories. It is useful in SP maps like when recruiting pre-placed units from the map. People could still use it for sorting as vanilla TS has GDI/Nod for House, YR has <none> there.
Yes I added the House column for Teamtypes even though it is not assigned in the RA2 AI because I thought it can still be useful if you do assign it. If not, I can remove it again. Are there any other values that could be useful to be displayed in a column? QUICK_EDIT
IsBaseDefense on TeamType and Initial Weight on AITriggers are useful. House on TeamType can be removed to save some real estate, it also seems to be drawn on top of ID which is underneath it.
Columns could be made swapable like to move to/from its vertical position. Those could have a minimum width or fixed width to start with so that user need not keep adjusting those. Just some thoughts if you get time. QUICK_EDIT
I updated to version 2.0.4.3 (download in first post):
Quote:
- Removed House column from TeamTypes tab as it is not all that useful.
- Added IsBaseDefense column to TeamTypes tab.
- Added Initial Weight column to TriggerTypes tab.
- Columns except for the Name column have fixed width.
- Increased screen real estate by broadening form width.
Probably my wordings were not clear on the column widths. What I meant was to give those some minimum width like of 3 characters. Now TechLevel shows 1... for 10 and the column is not adjustable. QUICK_EDIT
Oh I see. I do not have that problem on my machine but I suppose it depends on the font. Unfortunately the column widths are not set in terms of characters but in pixels. I'll widen the columns a bit. QUICK_EDIT
Most likely it is my 125% DPI setting that increases the font size and shows TechLevel 10 as 1.... Keeping the columns adjustable will allow support for bigger system fonts as well. QUICK_EDIT
These are great improvements. No longer do I need to add the difficulty and/or house prefix to the trigger/teamtype name
That's what I was thinking too.
Updated to version 2.0.4.4 with more contributions by E1 Elite:
Quote:
- Re-arranged and text aligned for the sort columns.
- Added TeamType House column again.
- Fixed width for column's attributes removed.
- Default width of left panel columns made compatible with both 100% and 125% DPI scaling.
Joined: 16 Feb 2005 Location: North America Posts: You cannot comprehend...
Posted: Sun Oct 27, 2019 12:15 am Post subject:
So how come there's no executable? I just downloaded a bunch of files from your link, but I have no idea what to do with them. _________________ Destroy to create. All for the hunt to dominate!
I guess you downloaded the source code from the link provided from the first post. Go down in the post and download the attachment named aieditv2_0_4_4.zip (current version). QUICK_EDIT
If Task Force in ai.ini contains same units in team, selecting one will give "Unhandled Exception" message.
Having task force like this:
Code:
0=1,APC
1=5,E1
2=5,E1
(I'm just experimenting with AI handling multiple transports).
I know that editor tries to merge newly added units like this into already existing group of same units, but it would be maybe easier let it up the user to decide.
Or maybe something like subtle dark-red font for highlighting unusual parameters. QUICK_EDIT
I am not clear to whether to combine those 2 seperate entries of the same unit into one when parsing the INI as that would be changing the INI. If it is not changed, it becomes inconsistent with the processing to increment/decrement the count of adding/deducting the unit if it exists and from which entry should it do. In the code it is in the place of common processing of both adding and editing etc.. Though valid, this case is an exception as it is not in the original INIs and doesn't happen through the AI editor.
From the game's perspective, having 2 seperate entiries for the same unit or having its count increased in a single entry makes no difference unless you are changing game.exe. For the load script action, if the count of infantry is less than the APC capacity, the script action won't finish. If it is same, the load process will complete. If the infantry count is more, then APC will be filled to its capacity and rest of the infantry will run along to execute the script actions. QUICK_EDIT
A similar bug happens when having more troops in a transport than it is supposed to be able to carry in a spawned TaskForce in missions.
Code:
0=1,APC ;;suppose Passengers=10
1=5,E1
2=5,E1
in a spawned TaskForce results in RA2 crashing upon selecting the APC and in YR the PipScale vanishes until there's no more than Passengers= in the vehicle. QUICK_EDIT
Changes:
- Support for same unit on multiple lines of TaskForce through config key SameUnitMultiEntry.
Note: Setting SameUnitMultiEntry to yes in [General] section of config file affects the TaskForce UI behaviour.
- Removes the unit dropdown ability to add to an existing unit entry when the same unit is selected in a different line/entry for a taskforce.
- Add/delete through +/- will operate on the first instance of the unit only even if it was selected from a different row.
- Setting SameUnitMultiEntry to no (default), will remove additional entries of same unit on UI click of those unit dropdowns.
It is not a regular case, so didn't feel like changing the UI to support this. But if ai.ini can have it and game supports it, AIEdit shouldn't be crashing on clicking that entry. As there is a trade-off on the current UI feature, had its support is pushed to the config file and is not enabled by default.
Having same unit on different lines would affect the production queuing when produced from the same factory. Like the sequence of production would be different for
I noticed one thing, though - script action 17 and 18 take numerical value from the scripttypes and teamtypes arrays respectively. Can this be made a dropdown list of the respective array?
In the current state, it makes it necessary to look up the details outside the editor. QUICK_EDIT
What you are asking is a complex feature. Proper implementation would need content awareness, Uses feature is a step towards that. But currently it is limited. For say teamtypes, it checks for teamtypes references in AITriggertypes. Getting list from rules is one thing like buildingtypes or unittypes as those are not editable through this tool, but scripts and teamtypes can be deleted and added. Either the tool should prevent the user from deleting an entry that has references that could be in scripts/aitriggertypes etc. or on deletion, all the references in that types list should be processed and its references updated. New ID generation uses a starting value and finds the next empty slot while incrementing number, so it could get a past number that was deleted. Usage of sorting and C# dictionary object makes it more trickier while processing indices.
I looked into the code, there is partial implementation for showing the script/teamtype list by Askeladd but it is commented in the code, may be due to complexity.
It is not a bug that I can fix in a few minutes, so I will give it a pass. QUICK_EDIT
Changes:
- Default start index used in ID generation is now 02000000.
- Default start index for TS Firestorm is now 03000000. Available in config as StartIndexFS.
- Custom script action parameter dropdowns with ScriptParamTypes section.
- Script action detail updates and adds YR Phobos script actions.
- AI Guide updates.
I keep getting an unhandled exception error. I am guessing it's because I have some unrecognized characters, like chinese characters. I don't mind re-saving a second rules to get around this, but what encoding should I save it as?
"Input string was not in a correct format" QUICK_EDIT
Checked rules and ai with UTF-8 encoding with Chinese characters in name, ID, dropdown etc., AIEditor works fine. Vanilla game should be supporting only ANSI for these files.
Problem could happen like if a number is expected in say Cost= and a non number is found.
If you can't figure out, send me the rules, ai INI files and config file also if modified, by PM or zip and attach here.. QUICK_EDIT
Any chance a tagged update version can be thrown up on the official AIEdit repo? Just came back to do some modding and google initially brought me to the legacy tagged version on the repo @ https://github.com/askeladdk/aiedit/releases/tag/v2.0.4.4
Great to see the tooling still being work and developed on! QUICK_EDIT
Changes:
- Corrections to script actions 56 and 57 (Chronoshift team).
- AITrigger Amount field's max limit raised.
- Improved parsing of Cost for technotypes.
- Updates to AI Guide.
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum