FunkyFr3sh Posted October 15, 2014 Author Share Posted October 15, 2014 i will add that, it is in my todo list :) You can already do it now, you will have to create your own _prac.mis (_spawn.mis on cncnet) for that. You can look at the coop maps, all of those come with preset alliances. You could just copy that file over or modify it to suit your own needs Quote Link to comment Share on other sites More sharing options...
FunkyFr3sh Posted October 15, 2014 Author Share Posted October 15, 2014 lil update, the colors of the ai players are now changeable too. You can give all ai players the same color or even give them the same color as your own if you like to toy around or do 2vs2 games with them :D Someone asked about the ai starting credtis (difficulty settings) here they are:easy = 4000normal = same as human playershard = 40000 Quote Link to comment Share on other sites More sharing options...
Feda Posted October 15, 2014 Share Posted October 15, 2014 Very nice man, I'll check all these in weekend! Quote Link to comment Share on other sites More sharing options...
Dato Posted October 16, 2014 Share Posted October 16, 2014 i beat hard AI with 2500 start money very easy :D40000 start money anyway not help AI :) Quote Link to comment Share on other sites More sharing options...
skuallx Posted October 31, 2014 Share Posted October 31, 2014 This is getting better every update! simply awesome!!! we play everyday! is it possible to add 2 things?1_ the possibility of choose allies.2_ please add an option to enable/disable queues feature. it would be fair if the ones we want to play with that feature can choose it. Thanks guys! :) Quote Link to comment Share on other sites More sharing options...
FunkyFr3sh Posted October 31, 2014 Author Share Posted October 31, 2014 Pre-set alliances, Selectable starting locations and spectator mode are on my to-do list, but i gotta look up some things first before i can add any of those :)queues feature will never be available online, sorry ;( 1 Quote Link to comment Share on other sites More sharing options...
skuallx Posted October 31, 2014 Share Posted October 31, 2014 Pre-set alliances, Selectable starting locations and spectator mode are on my to-do list, but i gotta look up some things first before i can add any of those :)queues feature will never be available online, sorry ;(well the first one is a really good news!! :D but when you said "queues never will be available" is sad. :( i suppose there are valid reasons for that. its a pity. thanks anyway for all effort Quote Link to comment Share on other sites More sharing options...
FunkyFr3sh Posted November 5, 2014 Author Share Posted November 5, 2014 New feature added:Specators will now see the money and kills of the other players instead of just the kills, now watching games is more fun :D In skirmish you will always be able to see the money of the AI players 2 Quote Link to comment Share on other sites More sharing options...
Iran Posted November 5, 2014 Share Posted November 5, 2014 Have you figured out how alliances work internally? You could check how the game sets up alliances when reading in a map file. Quote Link to comment Share on other sites More sharing options...
FunkyFr3sh Posted November 5, 2014 Author Share Posted November 5, 2014 havent looked yet, i need to look up how the houses are woking. Its not like in ra1 where the colors decide the house, yesterday i been messing around with it a lil because i wanted to add spec mode, but it isnt the order of the players inside of spawn.ini either. Will be able to add spec/alliances/selectable spawns once i know the logic :) The host is always multi1 and the ai players are added after the humans, thats all i know atm Quote Link to comment Share on other sites More sharing options...
Iran Posted November 6, 2014 Share Posted November 6, 2014 Isn't host always multi1 in C&C1 too? Quote Link to comment Share on other sites More sharing options...
FunkyFr3sh Posted November 6, 2014 Author Share Posted November 6, 2014 I dont know how it is in cnc1, no one messed around with the houses there cause we never added all these features that require knowledge about the houses. But it could be that cnc1 works the same since there is a host and all other players are guests like in dune.Anyways i checked how the radar was displaying the names and their matching kills and wrote a lil function to get the house of a player using his name like in the radar, spectators are now working and i can do it the same way for preset alliances. It seems like the player who is connecting first to the host becomes multi2, but not sure Quote Link to comment Share on other sites More sharing options...
Feda Posted November 6, 2014 Share Posted November 6, 2014 It seems like the player who is connecting first to the host becomes multi2, but not sureI told you that :D shaokhan said same thing Quote Link to comment Share on other sites More sharing options...
Iran Posted November 8, 2014 Share Posted November 8, 2014 BTW did you find the function for multiplayer unit spawning? Quote Link to comment Share on other sites More sharing options...
FunkyFr3sh Posted November 8, 2014 Author Share Posted November 8, 2014 yes, i had to modify that longer time ago to make pre placed buildings work online cause that did not work in multiplayer games. Now i had to modify it again to skip spawning the starting units for spectators Quote Link to comment Share on other sites More sharing options...
Iran Posted November 8, 2014 Share Posted November 8, 2014 I just saw you modify some spots in the code. I've documented the code for multiplayer spawning. Try playing around with these code locations: .text:00469FD0 Do_MCV_Spawn: ; label starts doing the MCV spawning .text:00469FD0 mov eax, [esp+17D8h+Current_Selected_Spawn_Location] ; a value 0-7 for each possible map spawn location, stack (ESP) value needs to be changed, NOT eax as the same stack value mght be used for unit (UnitCount) spawning. Set here just before MCV spawning .text:00469FF5 mov byte ptr ds:gSpawnLocationUsedBoolArray[eax], 1 ; byte values for whether spawn location is used or not, 1 is used and 0 is used. Set here just before MCV spawning .text:0046A01E mov esi, [esp+17D8h+Current_Player?] ; current player index, from 0 to ? (7 I assume) .text:0046A04A call ModAddUnit__unit_spawn_func_ ; Spawn MCV Spawning the other units is done after MCV spawning but as long as you set the stack value for [esp+17D8h+Current_Selected_Spawn_Location] just before MCV spawn the units will be spawned around the new location after MCV spawning. That should be all that's needed for selectable spawn locations. What I suggest doing is hooking: .text:00469FD0 mov eax, [esp+17D8h+Current_Selected_Spawn_Location] and at that spot have the code do: 1. Check if [esp+17D8h+Current_Player] is 0, which should mean the game is trying to spawn the MCV for the first player, whose spawn location has been randomly determined.2. If current player == 0, run the init code which consists of setting the byte ptr ds:gSpawnLocationUsedBoolArray array to 1 for every spawn location that has been selected by a player before game start.3. Check if current player spawn matches the spawn selected by the current player (you need to initialize a new array in the spawn config reading code for this), if not set the current player spawn to the one the current player selected before game start else select a new random spawn and check again whether the new random spawn has already been used (via checking byte ptr ds:gSpawnLocationUsedBoolArray)4. Set esp+Current_Selected_Spawn_Location correctly after determining the correct spawn. The spawning logic looks similar to Red Alert and Tiberian Sun so it's probably the same, there's a check after spawning the first player to make sure the second player spawn is as far away as possible from the first player. If player 1 selects his spawn and player two is random spawn it should work just fine with the farest distance spawn logic, but if player spawn 1 is random and player 2 selects his spawn then player 1 won't always be the furthest away from the other player. You'll have to write up some extra logic for that. Quote Link to comment Share on other sites More sharing options...
Iran Posted November 8, 2014 Share Posted November 8, 2014 Can you show me a spot where the game sets up alliances (e.g. for single player missions)? Want to see how it works. Quote Link to comment Share on other sites More sharing options...
FunkyFr3sh Posted November 8, 2014 Author Share Posted November 8, 2014 yes i noticed mcv spawning and the other units are kinda separated (disabled each of them once to see what it is about). I didnt look into the selectable spawns yet cause when i made the map preview generator i noticed that every starting location got the same id (not like in the other games where you have waypoint 0-7). But i guess it just starts from the top left going to the bottom right and saves them in that order.Yes i know about that logic, the reason why i wanted to add the spec mode quick was that i wanted to skip spawning units for spectators but keep the same logic (player1 biggest distance to player 2 etc) cause we always had problems with messed up spots when one guy was watching :) The first player is using a random number for the spots like you said, so i had to add my code infront of that to make sure the spots are still random even if the host (multi1) is spectator hehe thanks for the help, will prolly look into that stuff the next days Quote Link to comment Share on other sites More sharing options...
FunkyFr3sh Posted November 8, 2014 Author Share Posted November 8, 2014 Can you show me a spot where the game sets up alliances (e.g. for single player missions)? Want to see how it works.The alliances are saved in the .mis files (works in multi and single player too), if you follow the code where it loads the file named _prac.mis you will find where it saves the alliances for sure check here:0x004752FE <- should be skirmish0x0047533D <- should be multiplayer Quote Link to comment Share on other sites More sharing options...
Feda Posted November 16, 2014 Share Posted November 16, 2014 Any progress with alliances? Quote Link to comment Share on other sites More sharing options...
Nyerguds Posted November 16, 2014 Share Posted November 16, 2014 Isn't host always multi1 in C&C1 too?I think so. If I remember correctly, C&C just switches the colours around. Quote Link to comment Share on other sites More sharing options...
FunkyFr3sh Posted November 17, 2014 Author Share Posted November 17, 2014 Any progress with alliances?nope, been doing other stuff :( I guess i will do the selectable starting locations first cause the alliances are not so nice without it (you know, the good ol 2vs2 top vs bottom problem) 2 Quote Link to comment Share on other sites More sharing options...
Feda Posted November 17, 2014 Share Posted November 17, 2014 Oh k. Btw I tried spectator mode but it doesnt seem to work, I get units and mcv as usual, radar isnt unlocked and shroud covers the map. It was with AI, maybe that's why? I was able to see their cash tho. Quote Link to comment Share on other sites More sharing options...
skuallx Posted November 17, 2014 Share Posted November 17, 2014 nope, been doing other stuff :( I guess i will do the selectable starting locations first cause the alliances are not so nice without it (you know, the good ol 2vs2 top vs bottom problem)Yes, that's really useful, but I think alliances it's important when you play with AI it would be more challenger. I've tried spectator mode, seems did not work for me too. :D Quote Link to comment Share on other sites More sharing options...
FunkyFr3sh Posted November 18, 2014 Author Share Posted November 18, 2014 Oh k. Btw I tried spectator mode but it doesnt seem to work, I get units and mcv as usual, radar isnt unlocked and shroud covers the map. It was with AI, maybe that's why? I was able to see their cash tho. Yes, that's really useful, but I think alliances it's important when you play with AI it would be more challenger. I've tried spectator mode, seems did not work for me too. :DSpectator mode only works in online games with at least 3players :D where 2 have to play and 1can be spectator In skirmish the game would end right away because you have no units Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.