Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

2 Pages12>
Options
Go to last post Go to first unread
Offline loveBomber  
#1 Posted : Monday, January 16, 2017 2:14:50 PM(UTC)
loveBomber
Private
Joined: 1/16/2017(UTC)
Posts: 21

Thanks: 7 times
Hello!
I'm very new to scripting the AI in Zero Hour and so far... I'm having big troubles.
Making new maps works fine for me, changing INI files is cool and interesting after playing this game for so long and works with some trial and error, too.
However, when I want to edit the AI's "Teams" I cannot seem to export the scripts correctly anymore (even when I don't change anything). The game does not crash or anything but the AI does nothing for about 10secs, then sells his and my CC (plus my reactor looks damaged when I play China).

My Origin Zero Hour installation did not have a WorldBuilder.exe so I've downloaded 2 other versions from the web ("Enhanced" and a German translation), same result for both. What I do:
- I start WorldBuilder.
- I add skirmish players.
- I import scripts from the default SkirmishScripts.scb from 2003.
- I either change some Teams in that separate menu or I don't, doesn't seem to matter.
- I go to Scripts again, click export. I'm unsure what to include, most of the time I uncheck all but "Export all scripts" (then the resulting file has the correct size of 2220KB, too).
- I start the game, skirmish 1v1 vs hard AI on Tournament Desert and then the aforementioned stuff happens.

Google brought up a seemingly similar issue in a post from 2015 with from what I can tell the Contra mod and 2 GLA generals but this happens vs other generals as well for me (all of them it seems).
Where does it all go wrong?

Any help is greatly appreciated!

Edited by user Tuesday, January 17, 2017 9:22:56 AM(UTC)  | Reason: Not specified

Sponsor
Offline zero hour mad map maker  
#2 Posted : Monday, January 16, 2017 2:35:25 PM(UTC)
zero hour mad map maker
Colonel
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 12/27/2013(UTC)
Posts: 681
Canada
Location: MLP

Thanks: 181 times
Was thanked: 143 time(s) in 119 post(s)
All version of Zero Hour should come with the World Builder. I downloaded my ZH for origin and it came with the World Builder. Perhaps you couldn't find it?

As for the Skirmishscripts.scb, the default one is bugged to where the AI player's scripts are in the wrong folders. That could be the source of the problem.

Attached below are the fixed scripts that you can import into you map.

(I remember AcidBrain talking about these skirmish scripts sometime ago. I'll thank him for teaching me that ;))

Edited by user Monday, January 16, 2017 2:37:03 PM(UTC)  | Reason: Not specified

File Attachment(s):
SkirmishScripts.rar (63kb) downloaded 17 time(s).
Ready for Anything! --- C&C Labs Staff , Maps Staff , Moderator
thanks 1 user thanked zero hour mad map maker for this useful post.
loveBomber on 1/16/2017(UTC)
Offline klingondragon  
#3 Posted : Monday, January 16, 2017 2:40:51 PM(UTC)
klingondragon
General
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 4/10/2014(UTC)
Posts: 1,591
United Kingdom
Location: Laniakea; Virgo Supercluster; Local Sheet; Local Group; Milky Way Galaxy; Orion–Cygnus Arm; Gould Belt; Local Bubble; Local Interstellar Cloud; Sol System; Sol III; Europe; United Kingdom of Great Britain and Northen Ireland; Great Britain; England; Essex

Thanks: 16 times
Was thanked: 247 time(s) in 217 post(s)
My version of ZH (on origin) has the worldbuilder.
Here's the location:
C:\Program Files (x86)\Origin Games\Command and Conquer Generals Zero Hour\Command and Conquer Generals Zero Hour\WorldBuilder.exe
thanks 1 user thanked klingondragon for this useful post.
loveBomber on 1/16/2017(UTC)
Offline loveBomber  
#4 Posted : Monday, January 16, 2017 3:56:58 PM(UTC)
loveBomber
Private
Joined: 1/16/2017(UTC)
Posts: 21

Thanks: 7 times
Hey and thanks for the quick responses!
I've double checked it but my default installation does not have a WorldBuilder.exe for some reason.
I've had a mod (Shockwave) installed once on this machine so I thought it could have been removed during the uninstall somehow, but a fresh and clean re-install of Zero Hour an hour ago did not bring a WorldBuilder with it.

However, it seems to be working fine with the linked and fixed skirmish scripts, so thanks a ton! (Apparently I downloaded them 2 days ago already but forgot about them. Could have saved me quite a few hours and frustation.)
I only made a quick import/ export test but I'm positive it will work from here on. Smile Thumb Up Thumb Up


EDIT: Oh, and one more question if you don't mind: Assuming you are using a multi-monitor-setup, what are you using to lock the mouse cursor to the Zero Hour application window (fullscreen)?
I once had this colorful anti-cheat-tool installed for that - forgot its name, sorry - but the game crashed quite frequently then (the default virus/ technical issue message), esp. alt-tabbing did not work.

Edited by user Monday, January 16, 2017 4:00:21 PM(UTC)  | Reason: Not specified

Offline klingondragon  
#5 Posted : Monday, January 16, 2017 4:00:26 PM(UTC)
klingondragon
General
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 4/10/2014(UTC)
Posts: 1,591
United Kingdom
Location: Laniakea; Virgo Supercluster; Local Sheet; Local Group; Milky Way Galaxy; Orion–Cygnus Arm; Gould Belt; Local Bubble; Local Interstellar Cloud; Sol System; Sol III; Europe; United Kingdom of Great Britain and Northen Ireland; Great Britain; England; Essex

Thanks: 16 times
Was thanked: 247 time(s) in 217 post(s)
One would think that, every user get's the same stuff they download a game through origin (or steam, or any other similar service).
Offline klingondragon  
#6 Posted : Monday, January 16, 2017 4:06:05 PM(UTC)
klingondragon
General
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 4/10/2014(UTC)
Posts: 1,591
United Kingdom
Location: Laniakea; Virgo Supercluster; Local Sheet; Local Group; Milky Way Galaxy; Orion–Cygnus Arm; Gould Belt; Local Bubble; Local Interstellar Cloud; Sol System; Sol III; Europe; United Kingdom of Great Britain and Northen Ireland; Great Britain; England; Essex

Thanks: 16 times
Was thanked: 247 time(s) in 217 post(s)
Quote:
EDIT: Oh, and one more question if you don't mind: Assuming you are using a multi-monitor-setup, what are you using to lock the mouse cursor to the Zero Hour application window (fullscreen)?
I once had this colorful anti-cheat-tool installed for that - forgot its name, sorry - but the game crashed quite frequently then (the default virus/ technical issue message), esp. alt-tabbing did not work.

Was that tool called gentool? I had it for a bit but didn't like it.

I have a multi monitor setup and, as far as I know, one can't lock the mouse to just that monitor.
If I am going to start playing the game properly (as opposed to quickly testing a bit of a mod or a map), I use START + P to use my 'second screen' (an external monitor plugged into my laptop (I use this as the ratio is 4:3 instead of 16:9)), and switch back to 'extended' when I'm done.
Offline zero hour mad map maker  
#7 Posted : Monday, January 16, 2017 6:42:01 PM(UTC)
zero hour mad map maker
Colonel
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 12/27/2013(UTC)
Posts: 681
Canada
Location: MLP

Thanks: 181 times
Was thanked: 143 time(s) in 119 post(s)
Originally Posted by: loveBomber Go to Quoted Post
ort test but I'm positive it will work from here on. Smile Thumb Up Thumb Up


EDIT: Oh, and one more question if you don't mind: Assuming you are using a multi-monitor-setup, what are you using to lock the mouse cursor to the Zero Hour application window (fullscreen)?
I once had this colorful anti-cheat-tool installed for that - forgot its name, sorry - but the game crashed quite frequently then (the default virus/ technical issue message), esp. alt-tabbing did not work.


Yes you are thinking about Gentool. I on the other hand, think it's a handy little tool that does a lot.

You can get it here ^~^
Ready for Anything! --- C&C Labs Staff , Maps Staff , Moderator
Offline loveBomber  
#8 Posted : Tuesday, January 17, 2017 2:49:15 AM(UTC)
loveBomber
Private
Joined: 1/16/2017(UTC)
Posts: 21

Thanks: 7 times
Right, Gentool was its name. Thanks! Gonna give it a try again later.

I think it may have to do with my Generals/ Zero Hour version being the stupid German cyborg version because the original one got banned in my country. Maybe they forgot to add the WorldBuilder again (or it was too cruel and dangerous to be able to make your own stuff for German standards -.-). I remember using WorldBuilder back in 2003/2004 but this may have been in the original non-cyborg version.
Offline loveBomber  
#9 Posted : Tuesday, January 17, 2017 5:01:20 AM(UTC)
loveBomber
Private
Joined: 1/16/2017(UTC)
Posts: 21

Thanks: 7 times
One more scripting question:

I've followed the procedure as outline in my first post in this thread, then clicked "Edit Teams" and changed the Demolition (and the other GLA) General's artillery waves so they don't use SCUD Launchers anymore (I've either replaced them with my custom adapted Rocket Buggies or put a few Terrorists in there).
However, when I play a game vs AI they still build SCUD Launchers at some point and quite a few of them. I've checked the waves again and clicked most of the other waves too (like tank waves) but there is no SCUD to be found.
I export the scripts after editing back to SkirmishScripts.scb.

Is there something I am missing?
Offline klingondragon  
#10 Posted : Tuesday, January 17, 2017 5:28:09 AM(UTC)
klingondragon
General
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 4/10/2014(UTC)
Posts: 1,591
United Kingdom
Location: Laniakea; Virgo Supercluster; Local Sheet; Local Group; Milky Way Galaxy; Orion–Cygnus Arm; Gould Belt; Local Bubble; Local Interstellar Cloud; Sol System; Sol III; Europe; United Kingdom of Great Britain and Northen Ireland; Great Britain; England; Essex

Thanks: 16 times
Was thanked: 247 time(s) in 217 post(s)
German game laws are just stupid.
I kind of understand the 'no Nazi' rules (although trying to hide a swastika with a diamond makes the game ok (makes little sense, everyone knows there's a swastika there)). But the crackdown on blood and violence, too harsh.

Anyway, your problem is that the waves are stored as teams (not scripts).

Edited by user Tuesday, January 17, 2017 5:31:32 AM(UTC)  | Reason: Homophones

Offline zero hour mad map maker  
#11 Posted : Tuesday, January 17, 2017 7:49:03 AM(UTC)
zero hour mad map maker
Colonel
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 12/27/2013(UTC)
Posts: 681
Canada
Location: MLP

Thanks: 181 times
Was thanked: 143 time(s) in 119 post(s)
Originally Posted by: loveBomber Go to Quoted Post
One more scripting question:

I've followed the procedure as outline in my first post in this thread, then clicked "Edit Teams" and changed the Demolition (and the other GLA) General's artillery waves so they don't use SCUD Launchers anymore (I've either replaced them with my custom adapted Rocket Buggies or put a few Terrorists in there)


Originally Posted by: klingondragon Go to Quoted Post


Anyway, your problem is that the waves are stored as teams (not scripts).


He already changed the teams, so that's not the problem.


One possibility is that you've exported the scripts from your map. So the AI have nothing you've changed to follow. (Because, remember, in skirmish maps you don't necessarily need any scripts as they will follow the default SkirmishScripts even if the scripting menu is blank.)

Keep the scripts in your map. Do not export them or do anything. Try importing, making your changes, and then just saving your map.

Try that before anything else might be suggested




Ready for Anything! --- C&C Labs Staff , Maps Staff , Moderator
Offline AdrianeMapMaker  
#12 Posted : Tuesday, January 17, 2017 7:57:00 AM(UTC)
AdrianeMapMaker
General
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 3/8/2016(UTC)
Posts: 1,156
Philippines

Thanks: 312 times
Was thanked: 185 time(s) in 149 post(s)
yah, thats right.
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb

UserPostedImage





Offline zero hour mad map maker  
#13 Posted : Tuesday, January 17, 2017 9:16:31 AM(UTC)
zero hour mad map maker
Colonel
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 12/27/2013(UTC)
Posts: 681
Canada
Location: MLP

Thanks: 181 times
Was thanked: 143 time(s) in 119 post(s)
May I ask what you do when export your scripts and why? Just out of curiosity ;)

Edited by user Tuesday, January 17, 2017 12:13:28 PM(UTC)  | Reason: Not specified

Ready for Anything! --- C&C Labs Staff , Maps Staff , Moderator
Offline loveBomber  
#14 Posted : Tuesday, January 17, 2017 9:21:10 AM(UTC)
loveBomber
Private
Joined: 1/16/2017(UTC)
Posts: 21

Thanks: 7 times
Originally Posted by: Zero Hour Mad Map Maker Go to Quoted Post
One possibility is that you've exported the scripts from your map. So the AI have nothing you've changed to follow. (Because, remember, in skirmish maps you don't necessarily need any scripts as they will follow the default SkirmishScripts even if the scripting menu is blank.)
Keep the scripts in your map. Do not export them or do anything. Try importing, making your changes, and then just saving your map.


Oh, I think I was (still am) misunderstanding that then. I want to make a small mod for a friend of mine and myself which we can play on all official and some custom maps. I assumed I needed to change the SkirmishScripts.scb in GameFolder\Data\Scripts (which I still think is true, because of the AI bug before too). For that reason I start WorldBuilder, import scripts, edit teams, OK and export scripts.
I don't want them to be just map specific. Is that the correct approach?
Offline zero hour mad map maker  
#15 Posted : Tuesday, January 17, 2017 12:12:49 PM(UTC)
zero hour mad map maker
Colonel
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 12/27/2013(UTC)
Posts: 681
Canada
Location: MLP

Thanks: 181 times
Was thanked: 143 time(s) in 119 post(s)
Ohhhh, so if I am understanding correctly you want to change the AI for the entire game right? That makes sense. Though I'm not entirely sure how you would do that quickly. May I suggest you get the Zero Hour Advanced AI mod? That basically does what you want to do, as it changes the AI dramatically.

However, if you want to do your own AI type of mod, don't let me stop you ;). Unfortunately, I'm quite unsure how you would change the AI for all the maps. Maybe using the Advanced AI mod as a guide you can follow what they have done and try to apply it to your situation.
Ready for Anything! --- C&C Labs Staff , Maps Staff , Moderator
Offline klingondragon  
#16 Posted : Tuesday, January 17, 2017 1:15:52 PM(UTC)
klingondragon
General
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 4/10/2014(UTC)
Posts: 1,591
United Kingdom
Location: Laniakea; Virgo Supercluster; Local Sheet; Local Group; Milky Way Galaxy; Orion–Cygnus Arm; Gould Belt; Local Bubble; Local Interstellar Cloud; Sol System; Sol III; Europe; United Kingdom of Great Britain and Northen Ireland; Great Britain; England; Essex

Thanks: 16 times
Was thanked: 247 time(s) in 217 post(s)
That's why I was talking about teams. You have to change them in the aidata.ini file.
Offline loveBomber  
#17 Posted : Tuesday, January 17, 2017 3:25:15 PM(UTC)
loveBomber
Private
Joined: 1/16/2017(UTC)
Posts: 21

Thanks: 7 times
How so? My AIData.ini (62KB in size) does not seem to contain any team (as in unit squads/ waves/ ...) information, only the buildings build order for each general and some other data.
Offline klingondragon  
#18 Posted : Tuesday, January 17, 2017 6:51:59 PM(UTC)
klingondragon
General
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 4/10/2014(UTC)
Posts: 1,591
United Kingdom
Location: Laniakea; Virgo Supercluster; Local Sheet; Local Group; Milky Way Galaxy; Orion–Cygnus Arm; Gould Belt; Local Bubble; Local Interstellar Cloud; Sol System; Sol III; Europe; United Kingdom of Great Britain and Northen Ireland; Great Britain; England; Essex

Thanks: 16 times
Was thanked: 247 time(s) in 217 post(s)
I can't remember the exact file. Somewhere there are options to change the units used in skirmish games.
Offline acidbrain  
#19 Posted : Wednesday, January 18, 2017 12:01:29 AM(UTC)
acidbrain
General
Joined: 12/30/2011(UTC)
Posts: 982

Thanks: 95 times
Was thanked: 574 time(s) in 364 post(s)
Originally Posted by: loveBomber Go to Quoted Post
I assumed I needed to change the SkirmishScripts.scb in GameFolder\Data\Scripts (which I still think is true, because of the AI bug before too). For that reason I start WorldBuilder, import scripts, edit teams, OK and export scripts.
I don't want them to be just map specific. Is that the correct approach?

Yes, that is the correct approach.

If you want to change the AI units that are attacking you have to edit the skirmish scripts.
stuff
Just change the unit type in the teams that contain the scudlauncher, change it to rocketbuggy or something.
Dont forget to change it for all gla gens.

Another option is to make a map.ini with the following code in it, set buildable to no for all gla gens:
Code:

Object GLAVehicleScudLauncher
  Buildable = No
End

Object Demo_GLAVehicleScudLauncher
  Buildable = No
End

Object Chem_GLAVehicleScudLauncher
  Buildable = No
End

Object Slth_GLAVehicleScudLauncher
  Buildable = No
End

Be sure that your mate has the same map as you have(with the map.ini) when you start an online match, when you transfer a map in an online game the map.ini can cause trouble.
If you transfered the map in an online game and the match begins just restart and it will be fine then...

Greetz

Edited by user Wednesday, January 18, 2017 12:22:39 AM(UTC)  | Reason: Secret

Panem et kirkinses
Offline klingondragon  
#20 Posted : Wednesday, January 18, 2017 7:00:42 AM(UTC)
klingondragon
General
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 4/10/2014(UTC)
Posts: 1,591
United Kingdom
Location: Laniakea; Virgo Supercluster; Local Sheet; Local Group; Milky Way Galaxy; Orion–Cygnus Arm; Gould Belt; Local Bubble; Local Interstellar Cloud; Sol System; Sol III; Europe; United Kingdom of Great Britain and Northen Ireland; Great Britain; England; Essex

Thanks: 16 times
Was thanked: 247 time(s) in 217 post(s)
That works on one map. They're trying to do it for all maps (as a mod).
Users browsing this topic
Guest
2 Pages12>
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.