Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

General Editor/modding questions

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Strategic Command Series >> Strategic Command WWII War in Europe >> Scenario Design and Modding >> General Editor/modding questions Page: [1]
Login
Message << Older Topic   Newer Topic >>
General Editor/modding questions - 1/3/2021 1:55:36 PM   
Ason

 

Posts: 352
Joined: 11/29/2013
Status: offline
I made a custom scenario in which all countries are axis, except the Soviets.

The scenario works great when playing as axis against soviets, but when i try to play as soviets i get this error and the game crashes.

It happens around the end of the AI's turn, im guessing it's when AI is trying to purchase units?

I did edit and update the scripts succesfully (only have purchase, research and guard scripts so far)

Any ideas why this happens ?

Post #: 1
RE: General Editor/modding questions - 1/4/2021 2:08:23 PM   
Hubert Cater

 

Posts: 5199
Joined: 7/22/2013
Status: offline
Hi Ason,

Thanks for the report and is it possible for you to send me the saved turn as well as the customized campaign? This is unfortunately the only way for me to see what the issue might be and to resolve it for you.

Could you send it to support@furysoftware.com?

You can send it compressed, including the subfolder for the campaign, and use https://wetransfer.com if it makes it easier.

Hubert

_____________________________


(in reply to Ason)
Post #: 2
RE: General Editor/modding questions - 1/4/2021 8:59:55 PM   
Hubert Cater

 

Posts: 5199
Joined: 7/22/2013
Status: offline
Unfortunately, there is an error in the code. It is related to the builds or rebuilds of Carrier units. If you set the AI purchase scripts to zero for Carrier builds (for now) this should resolve the issue until the next update.

Note you'll have to start a new game for it to take effect.

Apologies for any inconveniences here.


_____________________________


(in reply to Hubert Cater)
Post #: 3
RE: General Editor/modding questions - 1/5/2021 11:05:12 AM   
Ason

 

Posts: 352
Joined: 11/29/2013
Status: offline
Alright, won't need any carriers anyway so it might be a permanent solution for me ;)

Thanks for taking a look at it!

(in reply to Hubert Cater)
Post #: 4
RE: General Editor/modding questions - 1/5/2021 7:01:15 PM   
Hubert Cater

 

Posts: 5199
Joined: 7/22/2013
Status: offline
My pleasure

_____________________________


(in reply to Ason)
Post #: 5
RE: General Editor/modding questions - 1/13/2021 3:46:43 PM   
Ason

 

Posts: 352
Joined: 11/29/2013
Status: offline
Is it possible to turn off attritional losses ?

(in reply to Hubert Cater)
Post #: 6
RE: General Editor/modding questions - 1/14/2021 9:59:29 AM   
BillRunacre

 

Posts: 4945
Joined: 7/22/2013
Status: offline
Losses due to low supply are hard coded, so I'm afraid not.

_____________________________

Follow us on Twitter: https://twitter.com/FurySoftware

We're also on Facebook! https://www.facebook.com/FurySoftware/

(in reply to Ason)
Post #: 7
RE: General Editor/modding questions - 1/16/2021 6:28:27 PM   
Ason

 

Posts: 352
Joined: 11/29/2013
Status: offline
Thanks Bill, That's a shame:(

Another question, how do i edit the amount of national morale a country loses when a unit is destroyed ? For example I would like to lower the national morale hit a country suffers when an infantry division is lost.

Or is my understanding of this completely wrong and unit losses don't affect national morale ?

< Message edited by Ason -- 1/16/2021 6:47:40 PM >

(in reply to BillRunacre)
Post #: 8
RE: General Editor/modding questions - 1/16/2021 8:41:35 PM   
Elessar2


Posts: 883
Joined: 11/30/2016
Status: offline
I know that losing warships does.

(in reply to Ason)
Post #: 9
RE: General Editor/modding questions - 1/17/2021 9:05:07 PM   
BillRunacre

 

Posts: 4945
Joined: 7/22/2013
Status: offline

quote:

ORIGINAL: Ason

Thanks Bill, That's a shame:(

Another question, how do i edit the amount of national morale a country loses when a unit is destroyed ? For example I would like to lower the national morale hit a country suffers when an infantry division is lost.

Or is my understanding of this completely wrong and unit losses don't affect national morale ?


All strength point losses affect National Morale, and they are based on the MPP cost of the unit, so changing unit costs would be the thing to do here.

_____________________________

Follow us on Twitter: https://twitter.com/FurySoftware

We're also on Facebook! https://www.facebook.com/FurySoftware/

(in reply to Ason)
Post #: 10
RE: General Editor/modding questions - 1/18/2021 11:35:46 AM   
Ason

 

Posts: 352
Joined: 11/29/2013
Status: offline
Thanks!


If a country starts the game annexed by soviets and i would like to liberate and "activate" it when the axis reach their former capital, what events are needed?

I tried to have a "decision event" when axis reaches x,y(asking player if they want to liberate the country), if yes I made a "territory event" for the former capital and also a "war entry" to make sure the liberated country joins the war against soviets.


I couldn't even get the decision event to appear, but i would just like to know if i used wrong types of events or if another event is also needed before going further with this troubleshooting.

< Message edited by Ason -- 1/18/2021 11:38:31 AM >

(in reply to BillRunacre)
Post #: 11
RE: General Editor/modding questions - 1/18/2021 3:19:59 PM   
BillRunacre

 

Posts: 4945
Joined: 7/22/2013
Status: offline
You are using the right script types, but I probably wouldn't have the country actually start as annexed. Just have those hexes form part of the USSR.

In terms of the Decision, experiment with it so that it fires on the first turn of the campaign, perhaps using a modified version of your campaign that starts when the Decision should fire.

I hope that makes sense, but let us know if not or you still can't get it to work.

_____________________________

Follow us on Twitter: https://twitter.com/FurySoftware

We're also on Facebook! https://www.facebook.com/FurySoftware/

(in reply to Ason)
Post #: 12
RE: General Editor/modding questions - 1/18/2021 6:18:37 PM   
Ason

 

Posts: 352
Joined: 11/29/2013
Status: offline
quote:

You are using the right script types, but I probably wouldn't have the country actually start as annexed. Just have those hexes form part of the USSR.

The reason i made it start as annexed is because it's so simple to assign the hexes to the country in the editor.

If the hexes are part of the USSR from the start, I will have to put in every single hex manually in the script right?
If so is there some nice way of copying selected hexes in the editor and pasting them in a text document, or will i have to just do it all manually?

Also if say half the newly liberated country is still in soviet hands won't that put the soviet units in a bunch of pockets in the new country when all the hexes switch owner?

My plan was to only give the liberated country its capital and then the player/AI would have to liberate the rest of the country with units.

quote:

In terms of the Decision, experiment with it so that it fires on the first turn of the campaign, perhaps using a modified version of your campaign that starts when the Decision should fire.

That's a great idea will definately start doing it like this, thanks.


< Message edited by Ason -- 1/18/2021 6:19:06 PM >

(in reply to BillRunacre)
Post #: 13
RE: General Editor/modding questions - 1/19/2021 12:56:10 PM   
BillRunacre

 

Posts: 4945
Joined: 7/22/2013
Status: offline
Yes, if you select hexes then go to File -> Export Map Positions, it will save the hex locations into a text document.

This makes it much easier for adding them to scripts.

Experiment and see how it all works. If you encounter any problems then do let us know.



_____________________________

Follow us on Twitter: https://twitter.com/FurySoftware

We're also on Facebook! https://www.facebook.com/FurySoftware/

(in reply to Ason)
Post #: 14
RE: General Editor/modding questions - 1/20/2021 9:19:17 PM   
Ason

 

Posts: 352
Joined: 11/29/2013
Status: offline
Thanks Bill, I did try it the way you said and i managed to get the decision event to work.

However when the new country gets activated all the hexes switches from the soviets to the new country and all the soviet units disappear even though i set "#REMOVE= 0".

The 2nd problem is even though i made both a "War Entry" and a "Belligerence" event for the new country, it still won't go to war with the soviets. I have to manually declare war.

I'm suspecting that's the reason the soviet units disappear, they are not at war or allied so the soviet units have no option but to disappear I guess.

So I tried to make the new country start as Axis and at war with soviets, but i couldn't because for that they needed a capital (which they don't have at the start of the game).

Do you have any ideas of how to solve it?

The country that gets created is a major btw, could that be a problem ?

EDIT:
I tried switching the new country to a minor instead, it seems to have an easier time going to war with USSR using the scripts but still all units disappear from the territory even though "REMOVE = 0"... Still I'm guessing because the country gets created before going to war, so between being created and going to war all units get removed.


< Message edited by Ason -- 1/21/2021 1:20:42 AM >

(in reply to BillRunacre)
Post #: 15
RE: General Editor/modding questions - 1/21/2021 4:21:03 PM   
BillRunacre

 

Posts: 4945
Joined: 7/22/2013
Status: offline

quote:

ORIGINAL: Ason

Thanks Bill, I did try it the way you said and i managed to get the decision event to work.

However when the new country gets activated all the hexes switches from the soviets to the new country and all the soviet units disappear even though i set "#REMOVE= 0".


You may be able to get around this by either having the new country form first of all occupying just its capital hex, and then increasing in size in a subsequent turn.

Or using a LOOP script to remove Soviet units from the territory before it is formed. This might be better.

As to the rest, do you have a MOBILIZATION script in place to make the new country swing to whichever side it should be on?

This might be why your other scripts haven't worked, and I think it should all work whether the new country is a Major or Minor.

Give it a go and let us know.

_____________________________

Follow us on Twitter: https://twitter.com/FurySoftware

We're also on Facebook! https://www.facebook.com/FurySoftware/

(in reply to Ason)
Post #: 16
RE: General Editor/modding questions - 1/22/2021 11:50:08 AM   
Ason

 

Posts: 352
Joined: 11/29/2013
Status: offline
Yes sorry forgot to mention I did also create a Mobilization 3 script. Will give it a go again with a Major country.

quote:

You may be able to get around this by either having the new country form first of all occupying just its capital hex, and then increasing in size in a subsequent turn.

Or using a LOOP script to remove Soviet units from the territory before it is formed. This might be better.


Since it is a decision event based on when a unit occupies a hex I'm not entirely sure how i would do this since I can't set a date for the event.

So I don't know at what date to give them the rest of the territory and i don't know when to temporarily remove soviet units with LOOP script.

Or is there a way to make an event happen X turns after another event without using dates ?

Maybe I'm just trying to do something that isn't really possible :p

---

I also have another question if you don't mind.

Since we now can set up to 10 Major powers (correct me if i'm wrong), I'm wondering in the bitmap/interface files for the flags how do i know where to place the flags for the new majors ?

Until now it was simple, I simply replaced the existing flags with new ones, but since the last few majors don't have any flags how can i find out where to place them ?

Is there some template file that shows each country id on each position of the files ?

Something like this:




< Message edited by Ason -- 1/22/2021 12:05:41 PM >

(in reply to BillRunacre)
Post #: 17
RE: General Editor/modding questions - 1/22/2021 1:37:57 PM   
BillRunacre

 

Posts: 4945
Joined: 7/22/2013
Status: offline

quote:

ORIGINAL: Ason

Yes sorry forgot to mention I did also create a Mobilization 3 script. Will give it a go again with a Major country.

quote:

You may be able to get around this by either having the new country form first of all occupying just its capital hex, and then increasing in size in a subsequent turn.

Or using a LOOP script to remove Soviet units from the territory before it is formed. This might be better.


Since it is a decision event based on when a unit occupies a hex I'm not entirely sure how i would do this since I can't set a date for the event.

So I don't know at what date to give them the rest of the territory and i don't know when to temporarily remove soviet units with LOOP script.

Or is there a way to make an event happen X turns after another event without using dates ?

Maybe I'm just trying to do something that isn't really possible :p



A Decision Event can be used to trigger a LOOP script, e.g. whatever triggers the formation of this country could be used to fire a Decision Event that triggers:

a) the LOOP script
b) a Decision Event that happens in the next turn, so that by then the units have been moved.

Remember that a Decision Event can be a dummy, i.e. there is no text so no choice is given.

_____________________________

Follow us on Twitter: https://twitter.com/FurySoftware

We're also on Facebook! https://www.facebook.com/FurySoftware/

(in reply to Ason)
Post #: 18
RE: General Editor/modding questions - 1/22/2021 1:50:11 PM   
Hubert Cater

 

Posts: 5199
Joined: 7/22/2013
Status: offline
Hi Ason,

If you open the localization.txt file, found in the root folder of the game, and then search for the following:

#COUNTRY_ID_1= Abyssinia

It will now take you to the list of country IDs in the file. From here you can see that Germany is listed as the 45th ID, and in the flag file, as you count from the top, left to right, you'll see that Germany is the 45th flag. This should guide you for how each country matches up with each sprite slot in the flag file.

In the Editor, the country order can be changed, e.g. you'll see that in the main 1939 campaign itself Germany is listed as the 6th country, but that is just because we wanted to make it easier to create custom orders of countries, e.g. custom majors and so on, and not have to worry about re-ordering files such as the flag files to make it all work etc.

Hope this helps,
Hubert



_____________________________


(in reply to BillRunacre)
Post #: 19
RE: General Editor/modding questions - 1/22/2021 10:20:22 PM   
Ason

 

Posts: 352
Joined: 11/29/2013
Status: offline
I finally got it working! I forgot the option for decision events to display at start or end of the turn so by using two decision events, one at end and the other a dummy at the beginning of the turn, I got it working:)

The soviets end up in pockets in the new territory but I guess i can solve that somehow by spawning some soviet units in the most important areas before the territory switches.

---

I feel stupid for not counting the flags and figuring out that's exactly how it works :p


Thank you both for the help!

< Message edited by Ason -- 1/22/2021 10:21:43 PM >

(in reply to Hubert Cater)
Post #: 20
RE: General Editor/modding questions - 1/28/2021 5:06:54 PM   
Ason

 

Posts: 352
Joined: 11/29/2013
Status: offline
I'm trying to replace Abyssinia and Afghanistan (country ID 1 and 2) with my own factions. Most of the .png's in the bitmaps folder had 2 free slots on #1 and #2, so I placed my own flags there, but in the interface folder I found that the "game_screen_flag_sprites.png" only have 1 free space on the first slot, then at #2 it's the Albanian flag..


Edit: I decided to just switch the Hungarian and Romanian flags instead of Abyssinia and Afghanistan, but I've run into another problem..

I now saw that on the "Unit_Counter_Flag_Sprites.png in the bitmap folder the german flag seems to be on spot #25 even though the country id is 45...

How come?

I also tried to make a grid to easier see where each spot is but I can only get the grid to match the icons on one axis, if X-axis matches current flags, Y-axis doesn't match, and vice versa..

So I guess i'm asking how do i know where to place the new flags ?

(I'm not a pro when it comes to photoshop and especially not when it comes to editing things like this, are there any tutorials about editing these files? )

< Message edited by Ason -- 1/28/2021 5:40:32 PM >

(in reply to Ason)
Post #: 21
RE: General Editor/modding questions - 1/29/2021 11:24:14 AM   
BillRunacre

 

Posts: 4945
Joined: 7/22/2013
Status: offline

quote:

ORIGINAL: Ason

The soviets end up in pockets in the new territory but I guess i can solve that somehow by spawning some soviet units in the most important areas before the territory switches.



Hi Ason

Glad to hear you got that working, and have you experimented with the LOOP scripts to remove these Soviet units?

_____________________________

Follow us on Twitter: https://twitter.com/FurySoftware

We're also on Facebook! https://www.facebook.com/FurySoftware/

(in reply to Ason)
Post #: 22
RE: General Editor/modding questions - 1/29/2021 12:06:17 PM   
Hubert Cater

 

Posts: 5199
Joined: 7/22/2013
Status: offline

quote:

ORIGINAL: Ason

I'm trying to replace Abyssinia and Afghanistan (country ID 1 and 2) with my own factions. Most of the .png's in the bitmaps folder had 2 free slots on #1 and #2, so I placed my own flags there, but in the interface folder I found that the "game_screen_flag_sprites.png" only have 1 free space on the first slot, then at #2 it's the Albanian flag..


Edit: I decided to just switch the Hungarian and Romanian flags instead of Abyssinia and Afghanistan, but I've run into another problem..

I now saw that on the "Unit_Counter_Flag_Sprites.png in the bitmap folder the german flag seems to be on spot #25 even though the country id is 45...

How come?

I also tried to make a grid to easier see where each spot is but I can only get the grid to match the icons on one axis, if X-axis matches current flags, Y-axis doesn't match, and vice versa..

So I guess i'm asking how do i know where to place the new flags ?

(I'm not a pro when it comes to photoshop and especially not when it comes to editing things like this, are there any tutorials about editing these files? )


Hi Ason,

What I would suggest here is to look at the png file width and height dimensions. Usually then from the sprites you can see how many go across and then how many sprites go down in the file.

For example, in the unit_Counter_Flag_Sprites.png file, you'll see it is 20 sprites across, and 6 sprites down.

The file is then 1300x282, so to set the grid you can divide 1300 by 20 to give you 65 for the vertical grid spacing, and 282 divided by 6 to give you 47 for the horizontal grid spacing. In other words the individual flag sprites are 65x47 pixels.

Note, Germany is still in slot 45 in this file, it is just 20 across instead of 10 like in the other file.

Hope this helps,
Hubert


_____________________________


(in reply to Ason)
Post #: 23
RE: General Editor/modding questions - 12/11/2021 11:17:03 AM   
Ason

 

Posts: 352
Joined: 11/29/2013
Status: offline
Thank you for the replies, im back again after giving up last time ..

For some reason this time I decided to go back to doing my 2 new custom major factions as COUNTRY_ID 1 and 2... So I once again ran into the problem I had before... On all the bitmaps images there was 2 empty places on number 1 and 2 but then I went to edit the images in the interface folder...

I don't understand why Albania is flag #2 on the " game_screen_flag_sprites.png " but on the "flag_sprites.png" Albania is #3... I really dont want to redo all the other stuff i edited.. How come there is no free slots on #1 and #2 on the " game_screen_flag_sprites.png " ?

Is there some way to find out where country_id #2 is on that image?

Some other questions aswell,

I would like to simulate bombing done to a resource after a specific date. What script would I use for this?

I tried supply script but i cant get that to work. I'm guessing because there has to be an enemy unit on the resource to use supply scripts ?
quote:

; #DESTINATION_RESOURCE's will only be effected if they are under enemy control relative to #COUNTRY_ID.


But I couldn't even save it so maybe i set it up wrong ?
Country ID is correct ( I edited them for a fictional scenario so country id 115 is not USA anymore)
Is FLAG_ID not the same as COUNTRY_ID ? If not is there some file i can look at to see what FLAG_ID is connected to which COUNTRY_ID ?

quote:

{
#NAME= Allied bombing of oil fields 3
#POPUP= US and British bombers have targeted oil fields and refineries!
#IMAGE= doolittle.png
#SOUND= bomber_movement1.ogg
#FLAG= 1
#TYPE= 2
#AI= 0
#LEVEL= 0
#GV= 1[1,100]
#LINK= 0[0]
#TRIGGER= 10
#COUNTRY_ID= 115
#FLAG_ID= 115
#SEASON_FLAG= 0
#DATE= 1944/06/01
#SOURCE_POSITION=
#DESTINATION_RESOURCE= 49,88 [2, 5]
#DESTINATION_RESOURCE= 52,89 [2, 5]
#VARIABLE_CONDITION= 115 [1] [100] [0]
}




So I tried partisan script but I noticed there is no #DATE for partisan scripts..

So is this possible and what script do i need to use ?

Can I add #DATE to a script even if there is no #DATE explanation at the top, or if it's not there that means #DATE doesn't work with that kind of script ?

I guess in worst case I have to make dummy decision event for each date..

Also is it not possible to set how much damage partisans do to resources if no unit is spawned ?




< Message edited by Ason -- 12/11/2021 2:54:49 PM >

(in reply to Hubert Cater)
Post #: 24
RE: General Editor/modding questions - 12/12/2021 8:12:55 PM   
BillRunacre

 

Posts: 4945
Joined: 7/22/2013
Status: offline
Hi Ason

A Supply script is the correct one to use. If the target to be damaged is in Axis hands then the #COUNTRY_ID= needs to relate to an Allied country, and it needs to belong to a fully active country.

There doesn't need to be an enemy unit involved, just leave this field empty (i.e. as I've pasted it):

#SOURCE_POSITION=

I hope that helps?



_____________________________

Follow us on Twitter: https://twitter.com/FurySoftware

We're also on Facebook! https://www.facebook.com/FurySoftware/

(in reply to Ason)
Post #: 25
RE: General Editor/modding questions - 12/17/2021 9:08:10 AM   
Ason

 

Posts: 352
Joined: 11/29/2013
Status: offline
Yes thank you!

(in reply to BillRunacre)
Post #: 26
RE: General Editor/modding questions - 12/18/2021 5:55:22 PM   
Ason

 

Posts: 352
Joined: 11/29/2013
Status: offline
nvm solved

< Message edited by Ason -- 12/18/2021 6:11:00 PM >

(in reply to Ason)
Post #: 27
RE: General Editor/modding questions - 12/18/2021 9:02:54 PM   
The Land

 

Posts: 857
Joined: 2/19/2010
Status: offline
the first turn after the trigger date, I think was the answer! (Saw the question on a different device and couldn't answer...)

(in reply to Ason)
Post #: 28
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Strategic Command Series >> Strategic Command WWII War in Europe >> Scenario Design and Modding >> General Editor/modding questions Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

2.219