Posted by: johnmike - Tuesday, April 2, 2013 11:52:24 AM
Hi, I've came up with idea to make a skirmish match without basebuilding - just infantry units attacking each other. I've placed barracks, i've set up a script that transfers them to the "player1" (AI in slot 1), and now i just need to make sure that AI won't build anything. I've seen that there is a script: Player -> Build -> set Player1 unable to build buildings, but i have no idea under what team (PlyrCivilian, Skirmish factions, neutral, etc.) should i place it. I've tried placing it under "neutral" and "bonusPlayer" (faction that owns prebuilt barracks and transfers them to player1) and it won't work. AI builds normally. I would be very grateful if someone would help.

Posted by: ron - Wednesday, April 3, 2013 3:38:54 AM
hi,what you can do is: script: MAP - MODIFY - ADJUST THE TECHTREE FOR A SPECIFIC OBJECT TYPE in that script you got 4 options and can say about every object build ore not. a lot of work, every building seperate for eatch army. and you know player 1 is Player0 and player 8 is Player7 greetings ron

Posted by: johnmike - Wednesday, April 3, 2013 7:49:21 AM
Thank you for prompt reply, 1) under what category (neutral, PlyrCivilan, SkirmishChinaTankGeneral, etc.) do i create the script? 2) I've created it under "neutral", set AmericaPowerPlant to NOT be buildable, and i can still build it with a dozer. Nothing changed.

Posted by: i^love^mixery - Thursday, April 4, 2013 7:37:12 AM
just put a blank script in every player folder. that will prevent comps from doing anything. if you want comps to work in "infantry only" maps then you will have to script them entirely by yourself which is no easy task. as far as i know comps will build everything even though they are not allowed to. if they are told (by scripts) to build a specific building type they will ignore all restrictions. they will build everything which they should be able to by default. again this can only be fixed if you script them entirely by yourself. and to the question how you block specific unit types in your map: why dont you just remove/kill all commando centres and dozers/workers? the players are supposed to only own barracks anyway. if you cant do that by yourself then upload your map. i dont have the time to script the comp for you thought...

Posted by: johnmike - Thursday, April 4, 2013 9:25:07 AM
Thanks for the help, but how do i remove all command centers and dozers/workers? I've placed barracks in WorldBuilder, those are the only buildings i need, really. CCs are spawned automatically, how do i remove them? I'm not planning to release the map or anything like that, i'm just sort of experimenting on a default map from Zero Hour. Again, i appreciate your help, regards.

Posted by: i^love^mixery - Thursday, April 4, 2013 5:14:54 PM
you remove them by blowing them up in some sort of way. move all player start positions to the same place of the map then for example put loads of demo traps beneath them and use the script Unit -> Damage or Remove -> Deal lethal amount of damage to kill some of the traps. of course you could use loads of different methods to destroy them.

Posted by: johnmike - Thursday, April 4, 2013 5:26:20 PM
Oh so it is that way. No problem then, demo traps, general powers, spawn a particle cannon, whatever, really. It's a map for me only, you know, no need to code an AI or something like that. It doesn't have to be the most elegant solution, just so that comp won't build anything and treat my lovely Rangers with a Dragon Tank/Toxin Tractor :P So AI will ignore all those scripts that forbid building objects? I've noticed that earlier, when, trying to make an idle AI, i have just set starting money at 10. Result is i can't do anything while AI couldn't care less, builds a base and kills me. Are there any more scripts that AI will ignore? ------ [b]Edit[/b]: AAARGH now another problem! I've placed barracks by the border of the map, scripted DemoTraps to detonate and destroy Command Centers, everything works fine, but... The retarded AI sells those damn barracks in the very first second of the gameplay! I've ticked the "unsellable" option, but it won't help. AI doesn't give a damn about it once again. Is there a script that forbids this goddamn AI doing such stupid actions? Ticking "unsellable" does not affect ANYTHING. I^Love^Mixery, do you have an idea how to fix that?

Posted by: i^love^mixery - Thursday, April 4, 2013 7:42:28 PM
it is not easy to get AI to work in such a map. comps always sell buildings if you transfer them with the script player -> transfer. you will have to SPAWN the buildings instead. you will have to create 1 script for every start position for every comp player. like this: Tank General: *IF* This player start position is "1". *THEN* Spawn barracks at position 1 for player *IF* This player start position is "2". *THEN* Spawn barracks at position 2 for player *IF* This player start position is "3". *THEN* Spawn barracks at position 3 for player *IF* This player start position is "4". *THEN* Spawn barracks at position 4 for player (on a map with 4 starting positions) you will need this scripts for EVERY faction. there are 12. so you need 48 scripts in a 4 players map. You need both methods in your map. the transfer for human players and the spawn for comp players. the spawn version will only work for comps. the transfer version will only work for humans. so you have everything covered then. and about the cash thingy: the AI automtically recieves a few thousand $ every 30 seconds or so.. again put a blank script into their folders to prevent this. you will not be able to get the AI to work in such a map without putting scripts into their folders. you WILL have to script them entirely by yourself. there is no other way.

Posted by: johnmike - Thursday, April 4, 2013 8:39:01 PM
Wow mate, thanks. But how do i do that when i am using a Shockwave, Contra or ROTR version of WorldBuilder? How do i spawn, for example, Russian barracks, if there is no player like SkirmishRussia or anything like that. The same in case of other mods. For a matter of fact, i don't know what to do if there are some more / different generals than in the original Zero Hour. Can't add scripts because how would i do that if there are no player names. But again, i am very grateful for your help.

Posted by: i^love^mixery - Friday, April 5, 2013 6:59:56 AM
I have no idea about different zero hour versions. They should come with their own worldbuilder. If they don't then you are out of luck i guess.

Posted by: johnmike - Friday, April 5, 2013 10:01:35 AM
Well Shockwave comes with its own WB, and clicking the "add skirmish players" button in the player list menu does add all generals with 3 additional ones, but ROTR doesn't have such a feature for some weird reason. Can't i just create a new player, something like "SkirmishRussia" or anything like that? Again, thanks for your time. EDIT: WOW, i've finally did it. By reverse engineering the shellmap, i have managed to see how mod refers to one of the extra factions. How its name is called and things like that. So, i've played with scripts and everything (almost...) works fine. Player1's CC is blown up, his barracks do exist and he does not sell them, the problem i see is that he doesn't appear to be using them. A shame isn't it? They're sitting on the ground almost perfectly, so they're not spawned underground or anything like that, and the comp still won't build anything. Resources are not a problem, the start money is 999999, so what might be stopping the AI from wiping me with his infantry? PS For test purposes i have spawned the enemy barracks maybe 20 feet from my spawnpoint, it shouldn't affect anything should it? PS 2 My dozer can drive through those spawned barracks. Is there something wrong when this is happening?

Posted by: i^love^mixery - Friday, April 5, 2013 5:06:23 PM
[quote=johnmike;127628]PS 2 My dozer can drive through those spawned barracks. Is there something wrong when this is happening?[/quote] this happens when you spawn buildings by coordinates. spawn them at a waypoint instead (but then you wont be able to change the rotation). or paint impassable areas beneath them. about the thing that the comp wont do anything: well as i said. you have to script the comp and EVERYTHING he is supposed to do all by yourself. the easiest solution would be to just tell each faction to use the command ability of a specfic unit (Unit -> Command Button -> Use). Chose the barracks and pick the unit creation command buttons from the drop down menu. that way the comp is forced to build the specified stuff. with Player -> Hunt you should then be able to tell all that infantry units to attack. hopefully you can get this to work by yourself.

Posted by: johnmike - Friday, April 5, 2013 5:50:07 PM
Thanks mate! With this tutorial, i should work that out eventually. Now i just need to make a thread on how to import custom textures into WorldBuilder, and that would be the last of my questions. You've been a great help, have a nice day.

Posted by: Annihilationzh - Friday, April 5, 2013 6:44:05 PM
FYI World builder automatically adapts to game mods such as Contra and Shockwave. They might have customized world builder to fix graphical issues, but all the functions will remain unchanged. So if mixery says 'you must do this' and you can't because the mod isn't compatible, then it's a badly programmed mod and there's not a lot you can do about it.

Posted by: johnmike - Monday, April 8, 2013 5:32:04 PM
How do i give names to objects that i spawn? I can't select them in WB because they don't (yet) exist.

Posted by: i^love^mixery - Monday, April 8, 2013 6:51:23 PM
Just spawn them as a named object and write whatever you want it to be named in the name box. It will indeed show, that this units to not yet exist but you can ignore this massage in this case. The error message will only show up when you are writting that one script. It will disappear automatically.