Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Fri Dec 13, 2024 2:50 am
All times are UTC + 0
AI Join
Moderators: Community Tools Developpers
Post new topic   Reply to topic Page 1 of 1 [3 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
matt7785
Civilian


Joined: 20 Jul 2007

PostPosted: Mon Dec 09, 2019 12:54 am    Post subject:  AI Join
Subject description: A tool for joining multiple aimd.ini files together
Reply with quote  Mark this post and the followings unread

This is a small program for joining more than one aimd.ini files for Red Alert 2 together. With this program you can work on and test different parts of your AI separately, then automatically combine all the parts together without having to worry about anything having the same ID# or having to edit the TaskForces, ScriptTypes, TeamTypes, or AITriggerTypes lists. This script can also join together 2 or more fully built AI files to increase the variety of attacks and make the AI more unpredictable.

To use the program just give each aimd.ini file you want to combine a different name and put them in a new folder together with the ai-join.exe file and run it. It will create a new file named joined.ini, just rename that to aimd.ini and copy it into your Red Alert 2 directory to use it.

I've tested running the program on Windows 7 & 10 without problems, but if it doesn't run or you notice any bugs just let me know. The python source code is included and available at

https://github.com/matts-code/RA2/blob/master/ai-join.py



ai-join.zip
 Description:

Download
 Filename:  ai-join.zip
 Filesize:  6.42 MB
 Downloaded:  11 Time(s)


Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Tue Dec 10, 2019 5:00 am    Post subject: Reply with quote  Mark this post and the followings unread

Could be useful if testing individual triggers in a new ai.ini file and later merging it to the main INI.

For understanding, will use key or index for left of = and to the right side of = will use value or ID.

Cross referencing IDs causes the complexity when merging two of these game files. I also thought of a tool to merge 2 maps but had to drop the plan because of this, maps have far more complex cross referencing.

If the same TeamType/ScriptType/TaskForce or even the AITriggerTypes is used in both INIs, with case of IDs being same or case of IDs being different but content of the sections being same, processing is like the added one gets new ID and its references are changed. This results in duplicates. There is no way to know whether the user wants to use a common section or different.

Check if any of following duplicate handling is needed and is covered for your tool within a single INI:
- List duplicates (TaskForces, ScriptTypes and TeamTypes) are ignored by the game if either index or ID matches
- Index duplicates in AITriggerTypes are ignored (should be, need to test)
- For the remaining, section duplicates are overwritten
- Within a section, values of index/key duplicates are overwritten
- TaskForces, ScriptTypes and TeamTypes can't have same IDs, those should be unique
- AITriggerTypes index which looks like ID can be same as any IDs from TaskForces, ScriptTypes and TeamTypes
- Sections with IDs which are not in lists are useless, can be removed, this could be done after merging the contents

Others:
- Could use some other method to get the input files. When people make backup, they use Ctrl+c and Ctrl+v which results in a copy of the file with same extension in the same folder.
- Instead of random ID generation, a fixed number could be used to start with and then increment it, so that consecutive entries are close by. Or even prefix the existing IDs like AI01- etc. if length permits.
- TeamTypes index could also start with 0 instead of 1
- Could use logging to the console or to a file to inform of any errors or duplicates.

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Tue Dec 10, 2019 12:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

I fail to see the utility of this tool, once you have tested your special case trigger/script, you should understand how it works without needing to merge it with a full AI.

It's one of those cases where that old addage applies: if you can do it, you don't need instructions.

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [3 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
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


Powered by phpBB © phpBB Group

[ Time: 0.3577s ][ Queries: 13 (0.0593s) ][ Debug on ]