General Editor/modding questions

Please post here for questions and discussion about modding for Strategic Command.
Ason
Posts: 368
Joined: Fri Nov 29, 2013 11:14 am

General Editor/modding questions

Post by Ason »

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 ?

Image
User avatar
Hubert Cater
Posts: 5987
Joined: Mon Jul 22, 2013 11:42 am
Contact:

RE: General Editor/modding questions

Post by Hubert Cater »

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
User avatar
Hubert Cater
Posts: 5987
Joined: Mon Jul 22, 2013 11:42 am
Contact:

RE: General Editor/modding questions

Post by Hubert Cater »

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.
Ason
Posts: 368
Joined: Fri Nov 29, 2013 11:14 am

RE: General Editor/modding questions

Post by Ason »

Alright, won't need any carriers anyway so it might be a permanent solution for me ;)

Thanks for taking a look at it!
User avatar
Hubert Cater
Posts: 5987
Joined: Mon Jul 22, 2013 11:42 am
Contact:

RE: General Editor/modding questions

Post by Hubert Cater »

My pleasure [:)]
Ason
Posts: 368
Joined: Fri Nov 29, 2013 11:14 am

RE: General Editor/modding questions

Post by Ason »

Is it possible to turn off attritional losses ?
User avatar
BillRunacre
Posts: 6537
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

RE: General Editor/modding questions

Post by BillRunacre »

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/
Ason
Posts: 368
Joined: Fri Nov 29, 2013 11:14 am

RE: General Editor/modding questions

Post by 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 ?
User avatar
Elessar2
Posts: 1443
Joined: Wed Nov 30, 2016 12:35 am

RE: General Editor/modding questions

Post by Elessar2 »

I know that losing warships does.
User avatar
BillRunacre
Posts: 6537
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

RE: General Editor/modding questions

Post by BillRunacre »

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/
Ason
Posts: 368
Joined: Fri Nov 29, 2013 11:14 am

RE: General Editor/modding questions

Post by Ason »

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.
User avatar
BillRunacre
Posts: 6537
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

RE: General Editor/modding questions

Post by BillRunacre »

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/
Ason
Posts: 368
Joined: Fri Nov 29, 2013 11:14 am

RE: General Editor/modding questions

Post by Ason »

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.
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.
User avatar
BillRunacre
Posts: 6537
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

RE: General Editor/modding questions

Post by BillRunacre »

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/
Ason
Posts: 368
Joined: Fri Nov 29, 2013 11:14 am

RE: General Editor/modding questions

Post by 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".

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.
User avatar
BillRunacre
Posts: 6537
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

RE: General Editor/modding questions

Post by BillRunacre »

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/
Ason
Posts: 368
Joined: Fri Nov 29, 2013 11:14 am

RE: General Editor/modding questions

Post by Ason »

Yes sorry forgot to mention I did also create a Mobilization 3 script. Will give it a go again with a Major country.
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:
Image

User avatar
BillRunacre
Posts: 6537
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

RE: General Editor/modding questions

Post by BillRunacre »

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.
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/
User avatar
Hubert Cater
Posts: 5987
Joined: Mon Jul 22, 2013 11:42 am
Contact:

RE: General Editor/modding questions

Post by Hubert Cater »

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

Ason
Posts: 368
Joined: Fri Nov 29, 2013 11:14 am

RE: General Editor/modding questions

Post by Ason »

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!
Post Reply

Return to “Scenario Design and Modding”