Go Back   Savage 2: A Tortured Soul Forum > Savage 2 Modding

Notices

Savage 2 Modding Discussion of all things related to making mods of Savage 2

Reply
 
Thread Tools Display Modes
Old 12-24-2011, 03:55 AM   #1
Holleau

Holleau's Avatar
 
Join Date: Mar 2009
Posts: 46
Thanks: 5
Thanked 9 Times in 7 Posts
Default AI Commander mod + map v0.5

Update 2013.05.02 Durwyn's upgraded mod website

Visit this awesome site: https://dl.dropboxusercontent.com/u/5545718/Savage2MapsAI/Website/index.html

Update 2013.04.27 Durwyn's upgraded maps

Savage2MapsAI: https://www.dropbox.com/sh/r74blt0vlfnleo1/7DgVdCvdOZ/Savage2MapsAI

Portable Savage 2: https://dl.dropbox.com/u/5545718/Sav2.rarl

-----------------------------------------------------------------------------------------------------------------------------------------------------------
The old post:

Merry Christmas!

I'm working a mod what tries to emulate commanders and players. It's still unfinished, but because it's Christmas:

AI-eden: http://www.2shared.com/file/DEuFCs_M/AI-eden.html
AI-ancientcities:
http://www.2shared.com/file/-a59L7g5/AI-ancientcities.html
AI-autumn: http://www.2shared.com/file/a_ZhtAPK/AI-autumn.html


Here are some pictures (there is no human on the field):






How to handle:
- You can set AI units (number, difficulty: reaction time & aggroradius), and AI Commander in the menu [Esc]
- If nothing happens in the first 20 seconds don't panic! Commander orders & PET spawns are delayed.
-The script is independent from the map. If you copy the triggerlist, and the files from the resources folder to ANY map it has to work. (The dumbness of the AI can depend on map layout + The PETs have a weird urge to slaughter NPCs.)

Tips:
- If you enable the AI commanders first, the PETs won't be wandering around the map.

What's ready:
- The script finds mines at mapload, and use them as waypoints.
- The AI commander can build a preset base (the building places are set regardless if there's an other building or not, so please don't bulid in front of the base).
- The AI commander sends out workers, to build mines, garrisons, towers.
- Units (Pets) are using both ranged & melee weapons and sometimes an additional skill / spell. (The switch can be a bit slow.)
- The AI commander can give orders to the PETs.

The things I'm stuck with:
- The AI commanders won't use the game economy, because I can't reduce team gold.
- The detect hellshrine script is buggy (it's deactivated in this version)
- Collosion detection at spawning buildings (to avoid "overbuild")
- Let a human commander to give orders to pets. (Somehow use the UI multiselect indexes in SetPetJobPatrol)
- Do the same for summoned pets ("make" a guard position Petcommand)
- Do the same for officers. (Let them order around the Pet units.)
- Make AICommander voteable.
- Newly found bug: The basic pet commands (attack, return) can be binded in options. <= buggy function

If you enjoyed this sneak-peek, or if you can help me, please write a comment.

I wish you happy holidays: Holleau

Thank you Rohezal, for the knowledge and encouragement you gave me!

Last edited by Holleau; 05-02-2013 at 08:10 AM.
Holleau is offline   Reply With Quote
The Following 2 Users Say Thank You to Holleau For This Useful Post:
ultradm (02-29-2012), Yoshitsune (09-02-2012)
Old 12-24-2011, 09:03 AM   #2
coolnesss
Area Moderator

coolnesss's Avatar
 
Join Date: Feb 2009
Posts: 2,727
Thanks: 192
Thanked 364 Times in 290 Posts
Default

Very nice work buddy, and merry Christmas!
__________________
<RedOmen> s2 is prolly just making a minecraft clone mmo :P
coolnesss is offline   Reply With Quote
Old 12-24-2011, 11:39 AM   #3
SonOfAthena

SonOfAthena's Avatar
 
Join Date: Jul 2010
Posts: 6,035
Thanks: 7,047
Thanked 199 Times in 166 Posts
Default

Merry Christmas.

Good luck!
__________________

SonOfAthena is offline   Reply With Quote
Old 12-25-2011, 12:04 PM   #4
lololala

 
Join Date: Aug 2009
Location: Newerth
Posts: 18
Thanks: 1
Thanked 4 Times in 2 Posts
Default

Awesome !!!!
lololala is offline   Reply With Quote
Old 12-25-2011, 11:39 PM   #5
Holleau

Holleau's Avatar
 
Join Date: Mar 2009
Posts: 46
Thanks: 5
Thanked 9 Times in 7 Posts
Default Question

Hi all!

Thank you for the positive replies... those keeps me "ticking"! I can't get enough Let me know, if you want something implemented in the script.

I have a serious question, to the modding community: i think i can manage to let a human commander give orders to PETs via SetPetJobPartol <index> <posx> <posy> <posz>, and the index can be "grabbed" fom multiselect-index in the UI, but i can't figure out how to catch the right click of the commander player, to start my "CommandPet" script. (Should i make a panel, or an instance, or a template?) Sadly i suck at UI scripting, any help or clue would be appreciated.

I really hope you can help me. Best regards: Holleau

Last edited by Holleau; 12-25-2011 at 11:46 PM.
Holleau is offline   Reply With Quote
Old 12-27-2011, 12:25 PM   #6
Durwyn

 
Join Date: Jul 2011
Location: Belgium
Posts: 264
Thanks: 47
Thanked 67 Times in 54 Posts
Default

Nice mod i love playing against AI x) (im sure to win =P xD)

edit: i take back what i said, its not easy to win against AI :( (as a commander xD)

Last edited by Durwyn; 12-27-2011 at 04:09 PM.
Durwyn is offline   Reply With Quote
Old 12-27-2011, 06:19 PM   #7
Sintax

Sintax's Avatar
 
Join Date: Dec 2007
Posts: 188
Thanks: 15
Thanked 37 Times in 24 Posts
Default

This is a really cool project! This can be a great way for new players to practice without worrying about other people, especially for commanding.

I wish I knew more about modding and could help you out.

edit: it's fun to play as commander and mess around and try to win, but it always seems to crash after a while

Last edited by Sintax; 12-27-2011 at 06:39 PM.
Sintax is offline   Reply With Quote
Old 12-27-2011, 09:07 PM   #8
Holleau

Holleau's Avatar
 
Join Date: Mar 2009
Posts: 46
Thanks: 5
Thanked 9 Times in 7 Posts
Default Crashing bug

Hi all! Thank you for the feedback! It helps a lot. (I only can test in 2 computers & systems => so some problems can avoid my sight).

I've also experienced the crash problem under win7. The easy solution is to run Savage in XP compatibility mode => it wont't crash, only lag.

EDIT - the other solution: I can't put exactly my finger on the problem, my guess is that some scripts simply overused the memory. I've implemented some failsafes (if a sub-script is already running, the program won't start it again, and again, and again, and again...), so it should work. At least it's working on both of my computers without crash (under a 2 hour test). But if you experiencing any bugs please tell!

The links on the first post are changed!

Another problem: as you saw, the script can manage nearly 20 PETs... but if they doesn't change weapons / doesn't use skills then a lot more can be handled. (The most resource consuming task is the weapon swap between melee & ranged) The question is: What's better? A dozen of "reallike" warriors, or a horde of critters? (Or some mixture?)

If you have ideas, or found bugs, or just want to give me a happy day, please write!

Last edited by Holleau; 12-28-2011 at 02:20 AM.
Holleau is offline   Reply With Quote
Old 12-28-2011, 01:01 PM   #9
Durwyn

 
Join Date: Jul 2011
Location: Belgium
Posts: 264
Thanks: 47
Thanked 67 Times in 54 Posts
Default

I will test your new versions right now. first by letting AIs destroy themselves (and see if it crashes) and then i will take part in the combat as a commander.

The recommended number of PETs is still around 5?

Is it possible to change the waypoints to garrisons?
If the garr is closer to enemy MAIN base than others, regroup at x,y garrison

Maybe you can add a new scroll with real-like warriors <--> horde of newbies? xD
Thank you for your work, its pleasant during the work!

edit:
- on Duskwood, Humans siege dont move from the stronghold (Or only if enemys are in their sight, then they move)

Last edited by Durwyn; 12-28-2011 at 01:46 PM.
Durwyn is offline   Reply With Quote
Old 12-28-2011, 02:21 PM   #10
Holleau

Holleau's Avatar
 
Join Date: Mar 2009
Posts: 46
Thanks: 5
Thanked 9 Times in 7 Posts
Default Re: testing

Thanks for the voluntary testing! I really appreciate your help. The answers for your questions:
- The recommended number for pets is a sum of 10. But for testing purposes I usually max out everything (20 Pets on both sides, and 10 sec commander reaction_time)

- It's possible to change waypoints to garrisons, but I'd suggest to move the spawning positions to the nearest garrison. It seems to be easier. I'm planning to do it, if the crash & lag bugs are permanently fixed. (Last night I've tried a LAN game, and for some reason it was unstable.)

- I like the idea of separate "heroes" (who use abilities and changes weaponry) and "critters" (who use only one weapon). Maybe i'll use some different skins for the weaklings (one melee and one ranged per side). So players can fight in epic (50+ enemies) battles.

- I'll take a look on the Duskwood map today, and find out what the problem is.

P.S.: Is there any signs of the crush bug yet?

P.S.II.: If only I could make the PETs obeying the commander's orders.

Last edited by Holleau; 12-28-2011 at 02:25 PM.
Holleau is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 04:35 PM.