Company of Heroes

Two Questions

Reply to this topic Start new topic
# 1ladanyi Nov 19 2009, 06:18 AM
Hello Everyone,

I am new around here so I took the time to go over every single post I could find in regards to the two issues I am having. I did not find the answer although I learned a TON through this site. Thanks everyone.

I have been working on a skirmish map for over a month now. I think it is just about ready to be fiished up and shared. I have two small issues that are really starting to frustrate me.

Ok first of all. I used the World builder "latest version to build the map.
I am running windows Vista 32 bit on a Quad Core AMD Phenom CPU.

Ok My first question is this.

I have tried a million different things to try and get my population limit for my "map" increased just a little bit. I found the tutorials listed here http://www.gamereplays.org/community/index...howtopic=520142 and I followed the two that had something to do with .scar files but I found nothing that would help me with my problem. I have google searched for days off and on and although I have found some cool stuff the code I try in the .scar file just does not work:(

Here is the code I found that is supposed to be placed into the "my_map_info.scar" file
Everything below was pasted int omy .scar file with nothing else in the file. Then saved.


function OnInitID()

-- [[ Markers ]]

-- [[ Squad Groups ]]

end
function OnGameSetup()

-- set up the players, using only p1 and p2 as there is always guaranteed to be two
player1 = Setup_Player(1, 239040,"Allied Rifle Company",1)
player2 = Setup_Player(2, 239041,"Axis Infantry Company",2)

end
function OnInit()

SetPopCap()


end

Scar_AddInit(OnInit)


function SetPopCap()
Player_SetPopCapOverride(player1, 1000, -1, -1 )

-- sets the resources for player 1, beware high resources make the enemy very hard to beat
Player_SetResource(player1, RT_Manpower, 0) -- player, resource type, number of
Player_SetResource(player1, RT_Munition, 0)
Player_SetResource(player1, RT_Fuel, 0)
Player_SetResource(player1, RT_Action, 0)

Player_SetPopCapOverride(player2, 1000, -1, -1 )

-- sets resources for player 2
Player_SetResource(player2, RT_Manpower, 0)
Player_SetResource(player2, RT_Munition, 0)
Player_SetResource(player2, RT_Fuel, 0)
Player_SetResource(player2, RT_Action, 0)
end

----------------------------------------------------------------------***

First of all does anyone know if this code is proper? Will it work with a multiplayer skirmish map?
Every time I tried it my game would crash upon map load. I have read that all I need to do is place some code into my maps info.scar file and it should work. Am I off base here?


Ok sorry for the long post So far. I just want to make myself clear on my issues and hope some one here with some more knowledge can point me in the right direction.

I also found three seperate places with information regarding .scar files here but none worked for me.

http://forums.relicnews.com/archive/index.php/f-189.html


Second question...

when I save my map in the world builder and then "export package" the world builder creates the following files in the following locations..


location------
C:\Users\Ladanyi\Documents\My Games\Company of Heroes\ww2\Data\Scenarios\MP
Files saved to the above location-----

map_name.info
map_name_ambientAudio.scar
map_name_ID.scar
map_name.sgb
map_name_mm.tga
map_name_tml.tga

"The following files I created and placed into this directory for the loading screen and info pics. all tga's"

map_name.tga
map_name_base.tga
map_name_slots.tga
map_name_ss.tga

So in total I now have 10 files listed in my "MP" folder located at
C:\Users\Ladanyi\Documents\My Games\Company of Heroes\ww2\Data\Scenarios\MP


Now the worldbuilder also creates a sga file and exports it here
C:\Users\Ladanyi\Documents\My Games\Company of Heroes\ww2\scenarios
it's name is map_name.sga

So in all the worldbuilder " to the best of my knowledge" creates these 7 files.

map_name.info
map_name_ambientAudio.scar
map_name_ID.scar
map_name.sgb
map_name_mm.tga
map_name_tml.tga

map_name.sga <<<<<<<<<< located in seperate directory fromt he other 6 files.


Everything is working great. The ONLY THING that doe snto work is my loading screen..sad.gif

Actually the laoding screen does work if I run a mod called RC_Realism. But when I run COH without a mod I can not get the loading screen to work. Right now I have no modules files in my COH directories as I read that if a module is alphabetically listed before the rehlics.module file then the game would by default load it or some of it settings. So basically my question is..

What do I need to do in order to get my loading screen to show up when I launch my map?

I knwo it has something to do with the sgb or sga files or maybe a file I do not know about because as of right now I have searched through every file I can think of and I can not seem to get it working.


If you read this far thank you very much for your time. I hope some one can help me with these two issues.

Map loading screen not showing up "default COH loading screen does"
Population limit increased per my map only

If the pop limit can not be increased without me creating my own mod then I will rework my map "strategically " so the default population limit of 120 will do. I just need a little more pop limit than that.

Once again thank you for your time. Back to the grind stone. Only 7 maps left. :-)

I am putting together a series of maps "8" all skirmish and all based off of each other in terms of progression.

Here is an early screen without vegetation.



Attached thumbnail(s)
Attached Image

Posts: 28

Game: Battlefield 1943

+
# 2ladanyi Nov 19 2009, 06:26 AM
Another screen shot if anyone is interested. :-)

I will post here when I find the answer to my two problems even if no one replies so hopefully some one else can find this helpfull down the road..



Attached thumbnail(s)
Attached Image

Posts: 28

Game: Battlefield 1943

+
# 3ladanyi Nov 19 2009, 07:49 AM
just a shameless bump so maybe some one will notice it who can help.
thanks in advance.

Posts: 28

Game: Battlefield 1943

+
# 4ladanyi Nov 19 2009, 08:51 AM
ok I got my map loading screen going. Thanks to this thread

http://www.gamereplays.org/community/index...howtopic=483792

Although this thread solved my loading screen problem, THANKS!! it was not very clear on what to do so I will lay it out in an easy way so newbies like me can understand.


1- run corsix modstudio"latest version"
2-Once modstudio is loaded click on "load single sga archive" tab
3-then navigate to this directory if you are using vista. C:\Users\your username\Documents\My Games\Company of Heroes\ww2\scenarios """if using xp it difers slightly but still resides in the documents folder.""""""
4-select your .sga file associated with the map your creating.
5-click open
6-Once the file opens just chose your launguage and click ok
7-click on the "TOOLS" tab
8-double click the SGA PACKER icon
9-in the INPUT directory box just type in this location if you are on vista
C:\Users\your username\Documents\My Games\Company of Heroes\ww2\Data
10-in the SGA to CREATE option click BROWSE and select the sga you are trying to create or overwrite.
11- in the TOC NAME box just leave it set to data.

done!!

Now rememebr that once you build more on the map and export to test the map in game, you will have to repack with the modstudio because the world builder will overwrite the sga AGAIN.

so basically the last thing you want to do when you are completely done with your map after exporting out with worldbuilder is to repack the contents of the data directory as the final SGA file.

hope this helps.

Now to solve my population cap problem... :-)

Posts: 28

Game: Battlefield 1943

+
# 5ladanyi Nov 19 2009, 13:10 PM
Great talking to myself huh? LOL sorry, but I am updating my progress.

I still have not solved the issue with pop limit per map. I had hoped to get it done by this morning but no such luck. I have how ever finished my loading screen. "unless i pick it apart again"

If anyone has any idea what text goes into the info.scar file to up the pop limit for a 1v1 map by all means post it here. any idea at all would help.

Thanks..

This post has been edited by ladanyi: Nov 19 2009, 13:51 PM


Attached thumbnail(s)
Attached Image

Posts: 28

Game: Battlefield 1943

+
# 6OnkelSam Nov 24 2009, 08:23 AM
QUOTE(ladanyi @ Nov 19 2009, 10:51 AM) *

ok I got my map loading screen going. Thanks to this thread

http://www.gamereplays.org/community/index...howtopic=483792

I was just about to explain, how to pack your files with corsix, after going through your massive first post tongue.gif But it seems you found the other thread where i gave the info =)


QUOTE

Now rememebr that once you build more on the map and export to test the map in game, you will have to repack with the modstudio because the world builder will overwrite the sga AGAIN.

so basically the last thing you want to do when you are completely done with your map after exporting out with worldbuilder is to repack the contents of the data directory as the final SGA file.

hope this helps.

This is not 100% correct.

Just to clear things up a bit for you. When you work with worldbuilder, it creates and manages the data within several files. The your_map.sgb basicly holds all the information about the map itself, i.e. splat, object, spline locations etc. Then there are additional files created from your map for ingame purposes. All the .tga files are images, i.e. tactical map, mini-map, lobby screen, etc. The your_map.info holds the corner information about the map, like map size, map name, the mod you want to use it for, lobby map description etc. the .scar file contains the code, like for scripted missions etc. ... I think you get what i mean. When you hit "file/save" in worldbuilder, it saves your progress by updating those files i just listed.

Now the your_map.sga is not one of those files. It is an archieve that contains a package of all the other files. When you hit "Export package" within worldbuilder, this archieve will be created, based on the other files of your map (comparable to any other file packer, like winzip etc.). It uses the "archieve.exe" within your CoH root folder to create these files. So technically you can write your own executable file to package your map with the archieve.exe.

This was all you needed until the release of Tales of Valor. Somehow they managed to exclude specific files. But luckily you don't need to create your own packer, based on archieve.exe, because Corsix did this already for you. So you can use his Mod-studio, like i explained in the other thread.

But if you only hit "save" within worldbuilder, this should not change your .sga archieve. It only does, when you "export package".
BTW. If you load your game in dev-mode ( put " -dev" at the end of your short cut command line), then it executes your unpacked fiels, i.e. the .sgb etc. This is the reason, why you were able to see your loading screen, when using other mods, cause they mostly use dev mode.

QUOTE

Now to solve my population cap problem... :-)

I am sorry, i cant help you with scar coding. However, normally you should be able to create enough pop-cap, if you use the correct number of sectors. If you want to increase your pop cap further, then you can do this, by adding more sectors, especially strategic points. I am not sure how much exactly they increase your popcap, but i think it was something like 3 or 5 per sector.

....

Oh and another small tip. From the look at your screens it seems like you are running Worldbuilder in DirectX 10. This slows the whole thing down A LOOOOOT. Especially when rotating the camera and zooming out.

To run it in DirectX9 go to your CoH root folder and find "spDevices.lua". Open it with text-editor and change the order or dx10 and dx9 to this:
CODE

-- Modules should be listed in the order of preference
modules =
{
    "spDx9",
    "spDx10",
    
}


This post has been edited by OnkelSam: Nov 24 2009, 08:29 AM

Posts: 4,541

Clan: Company of Clowns

Game: Company of Heroes

+
# 7Spankyy Nov 24 2009, 10:03 AM
hi , i have a question , so if i add .TGA files to my sga with corsix then i only see my map while in " -dev" mode , but isnt there a way to see my map on the list even without using " -dev" ? or the map only works when exporting maps with WB while not in " -dev"...

Posts: 3,979

Clan: Wheres My Demo

Game: Company of Heroes 2

+
# 8OnkelSam Nov 24 2009, 11:12 AM
QUOTE(Spankzor @ Nov 24 2009, 12:03 PM) *

hi , i have a question , so if i add .TGA files to my sga with corsix then i only see my map while in " -dev" mode , but isnt there a way to see my map on the list even without using " -dev" ? or the map only works when exporting maps with WB while not in " -dev"...

that's wrong. ...

-dev mode loads the unpacked files. So you see your loading screen in -dev mode as long as you put it in the correct folder.

When you start CoH with the normal shortcut, then it loads the .sga archieve, not the unpacked .sgb. So, if you use the "export package" option from worldbuilder, to pack the .sga archieve, then it excludes the loadingscreen.tga for some reason. That's the reason, why you need to manually pack it with corsix.
Once you have packed the .sga correctly with corsix, you will see the loading screen also when you are in normal mode.

If you don't see your map ingame in normal mode. then it means you either have put the .sga in the wrong direction, or you used the packager in a wrong way.

This post has been edited by OnkelSam: Nov 24 2009, 11:13 AM

Posts: 4,541

Clan: Company of Clowns

Game: Company of Heroes

+
# 9Spankyy Nov 24 2009, 11:27 AM
I think i have done smth wrong then sad.gif

So heres what i did , i exported my map with WB , not seeing my loading screen included i used corsix to export the missing files. it asks me if i want to overwrite my existing .SGA so i overwrite the file , everything seems ok , the .SGA has all the right files in it and it's in the right directori (mydocuments\mygames\Companyofheroes\ww2\scenarios) ... so where did i go wrong ,cause i do understand how sga and sgb works but i think ive done smth wrong when exporting ... i feel dumb atm =)

(btw the map works without the" -dev" mode in the directori when exporter only with WB) just thought u might want to know tongue.gif

This post has been edited by Spankzor: Nov 24 2009, 11:28 AM

Posts: 3,979

Clan: Wheres My Demo

Game: Company of Heroes 2

+
# 10ladanyi Nov 24 2009, 21:21 PM
[/quote]Oh and another small tip. From the look at your screens it seems like you are running Worldbuilder in DirectX 10. This slows the whole thing down A LOOOOOT. Especially when rotating the camera and zooming out.

To run it in DirectX9 go to your CoH root folder and find "spDevices.lua". Open it with text-editor and change the order or dx10 and dx9 to this:
CODE

-- Modules should be listed in the order of preference
modules =
{
    "spDx9",
    "spDx10",
    
}

[/quote]


Thank you very much for the information. I have since figured out the population cap issue and also dived into a ton of game tweaks. ie "modding" I have learnd a ton in the past few weeks and I have enjoyed it very much. I have created mods for various platforms from rFActor to Mount and blade over the past six years or so but the structure and methods for COH were some what greek to me.

I am very familiar with image manipulation so that was the easy part :-) I just had to get a grasp on the layout of COH. It seems scar files can do a ton of the work for you providing you can find the proper code to place in them. At this point all I can say is thank god for the modstudio. LOL Too bad I did not start modding this platform a few years sooner :-) But then again, I may have suffered more if I had of, what with all of the changes since vanilla COH.

and yes my worldbuilder was running terribly slow so I will change it over to dx9. Every time I watched a tutorial and saw how fast it worked for others I thought to myself, what is wrong with my install.

Thanks again. As it stand right now I pretty much have a full blown modification going. it will be a lot more work but it has been a lot fo fun.

This post has been edited by ladanyi: Nov 24 2009, 21:32 PM

Posts: 28

Game: Battlefield 1943

+
# 11Spankyy Nov 25 2009, 16:25 PM
please help me out with my last question ! =) my friend cant seem to get my map working anymore n stuff... sad.gif

Posts: 3,979

Clan: Wheres My Demo

Game: Company of Heroes 2

+
# 12ladanyi Nov 26 2009, 04:32 AM
QUOTE(Spankzor @ Nov 24 2009, 06:27 AM) *

I think i have done smth wrong then sad.gif

So heres what i did , i exported my map with WB , not seeing my loading screen included i used corsix to export the missing files. it asks me if i want to overwrite my existing .SGA so i overwrite the file , everything seems ok , the .SGA has all the right files in it and it's in the right directori (mydocuments\mygames\Companyofheroes\ww2\scenarios) ... so where did i go wrong ,cause i do understand how sga and sgb works but i think ive done smth wrong when exporting ... i feel dumb atm =)

(btw the map works without the" -dev" mode in the directori when exporter only with WB) just thought u might want to know tongue.gif



The best I can offer you is what I do. Here goes.

Once I have my map EXPORTED from world builder I open up mod studio. Then I open my mod or if you do not have a mod just open any SGA file you have. Once it is open forget about it and go to TOOLS. then chose SGA PACKER.

Once the new window comes up click on the brows button to the right of the top empty directory box and navigate to this folder exactly If you are under vista..


C:\Users\You name\Documents\My Games\Company of Heroes\ww2\Data

Then click on BROWSE to the right of SGA create. Then navigate to this exact file

C:\Users\you name\Documents\My Games\Company of Heroes\ww2\scenarios\Your Map.sga

and select it. Chose Overwrite file and OK.

Then in the third and final box make sure DATA is the TOC name type. Then click create.

You map should now show in game and your loading screen should now work as well. That's saying your loading screen was in the first directory listed. All of your map contents with the sgb should be in..

C:\Users\your name\Documents\My Games\Company of Heroes\ww2\Data\Scenarios\MP

the data and scenerio folders hold the important files.

your Single SGA file should be located here..

C:\Users\your name\Documents\My Games\Company of Heroes\ww2\Scenarios

Good luck.

This post has been edited by ladanyi: Nov 26 2009, 04:37 AM

Posts: 28

Game: Battlefield 1943

+
# 13ladanyi Nov 26 2009, 04:40 AM
Also,

Your tga for your loading screen can be made and then placed into the folder with the sgb and other files. Once you pack that directory with modstudio then the loading screen will show.

Posts: 28

Game: Battlefield 1943

+
# 14OnkelSam Nov 26 2009, 08:15 AM
no offense ladanyi, but your description contains some unnecessary points and doesn't include one essential thing...

Like i explained in one of my previous posts, the "Export package" in Worldbuilder does nothing but using the archieve.exe to create an archieve of the worldbuilder files, like .sgb .info . scar, etc. But it does it incompletely. So you DO NOT WANT TO use the "Export package" thing withing worldbuilder at all. Instead we do all this with Corsix-Mod-Studio - SGA Packer, which does the same thing, but completely.

And, if you choose the "Data" folder as your Input for the SGA-packer, then it creates an archive of all maps you have stored in "MP" together, not just the one you wish to.

I'll explain again what to do:
  1. First of all you need to prepare your files. Create a folder, called "Your_Map_Name", although the name doesn't really matter. Within this folder create another folder called "Scenarios". Within the "Scenarios"-folder again create a folder called "MP".
  2. Take all your map files, eventually including a loading screen, called "Your_map_name.tga" and put all those files into the "MP" folder you just created.
  3. Now open up Corsix-Mod-Studio.
  4. Select "load single sga archive"
  5. Pick any .sga file you can find. It doesn't matter which one. For example, select another .sga map. Click ok and select your language.
  6. Once it has loaded. Go to the top left and choose the "tools" tab.
  7. In the new window double-click the "SGA-Packer" tool. A new box should pop up, requesting "input" and an "output" data.
  8. For the "input" line you click on "browse" and select the folder "Your_map_name", which you just created in step 1. You do NOT directly select the folder "MP", which holds your map files. The sub-folder structure is essential.
  9. For the "output" line you type in "Your_map_name" and then browse to the "C:\Users\you name\Documents\My Games\Company of Heroes\ww2\scenarios"-folder.
  10. For "TOC name" choose "Data"
  11. Hit "create" and that's it. You should be able to play your map with the normal CoH shortcut and all features that you assigned should be available.


This post has been edited by OnkelSam: Nov 26 2009, 08:15 AM

Posts: 4,541

Clan: Company of Clowns

Game: Company of Heroes

+
# 15Spankyy Nov 26 2009, 08:50 AM
Thank you Sam and Ladanyi ! smile.gif now it works , i appreciate the help! =) CHEERS!

Posts: 3,979

Clan: Wheres My Demo

Game: Company of Heroes 2

+

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)