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

RE: General Editor/modding questions

Post by 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? )
User avatar
BillRunacre
Posts: 6534
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

RE: General Editor/modding questions

Post by BillRunacre »

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

RE: General Editor/modding questions

Post by Hubert Cater »

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

RE: General Editor/modding questions

Post by Ason »

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 ?
; #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 ?
{
#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 ?


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

RE: General Editor/modding questions

Post by BillRunacre »

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

RE: General Editor/modding questions

Post by Ason »

Yes thank you!
Ason
Posts: 368
Joined: Fri Nov 29, 2013 11:14 am

RE: General Editor/modding questions

Post by Ason »

nvm solved
The Land
Posts: 940
Joined: Fri Feb 19, 2010 4:58 pm

RE: General Editor/modding questions

Post by The Land »

the first turn after the trigger date, I think was the answer! (Saw the question on a different device and couldn't answer...)
1985 Red Storm mod - Beta testing!

Always wanted to play a "Cold War goes hot" scenario? Come and join in!
Ason
Posts: 368
Joined: Fri Nov 29, 2013 11:14 am

Re: General Editor/modding questions

Post by Ason »

If I set up 2 puchase plan scripts for a country, both with identical conditions except for the date, so one has date 1941/01/01 and other 1942/01/01,will the game switch to the 1942 plan automatically at 1942/01/01 or do I need to set up more conditions ?

Also, is it possible to make a script that makes peace between 2 countries, so Germany would make peace with USSR but continue fighting Britain for example? If so which scripts should I take a look at ?
User avatar
BillRunacre
Posts: 6534
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

Re: General Editor/modding questions

Post by BillRunacre »

Ason wrote: Mon Feb 28, 2022 2:32 pm If I set up 2 puchase plan scripts for a country, both with identical conditions except for the date, so one has date 1941/01/01 and other 1942/01/01,will the game switch to the 1942 plan automatically at 1942/01/01 or do I need to set up more conditions ?
Yes it will. Place the 1942 one above the 1941 one, and it will use the 1941 one from January 1941, switching to the 1942 one the following January.
Ason wrote: Mon Feb 28, 2022 2:32 pm Also, is it possible to make a script that makes peace between 2 countries, so Germany would make peace with USSR but continue fighting Britain for example? If so which scripts should I take a look at ?
Yes it is, use the SURRENDER_2 script file. There is an armistice script in there already for Finland, so you could use its structure as a model for any more.

Yours will likely need their own Decision to trigger them, so you will need to open that script file too. Perhaps take a look at DE 619 as that is the one that triggers Finland's armistice.
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 almost managed to get it working the way I wanted, only problem is the german units in the USSR disappears/surrenders when surrender script kicks in. Is there any way to make those units "fall back" to the nearest german territory or something like that ?

The idea is that germany signs a peace with ussr to be able to use the troops in the east against britain instead.
So germany gives up all its gains in the USSR but gets to keep its troops.
User avatar
BillRunacre
Posts: 6534
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

Re: General Editor/modding questions

Post by BillRunacre »

Hi Ason

That shouldn't happen, and doesn't happen in our WWI game where Russia can withdraw from the war.

Here's the relevant script from that game, it's triggered by DE 620 so you'd have to change that, and I've also removed the #POPUP= and #IMAGE= contents as they wouldn't be right for WW2:

{
#NAME= Russia Surrenders (Brest-Litovsk Treaty)
#POPUP=
#IMAGE=
#SOUND=
#FLAG= 1
#TYPE= 1
#AI= 0
#LEVEL= 0
;Set global variable condition to always trigger (dummy value)
#GV= 1[1,100]
;Set link value to always trigger (dummy value)
#LINK= 620[1]
#COUNTRY_ID= 97
#RECIPIENT_ID= 97
#ARMISTICE= 1
#REMOVE= 3
#TRIGGER= 100
#DATE= 1914/08/01
;Set variable conditions:
;1st Line - Germany politically aligned with the Central Powers and not surrendered
#VARIABLE_CONDITION= 45 [1] [100] [0]
; dummy condition position
#CONDITION_POSITION= 0,0 [0,0] [0,0] [0] [0]
}

Hopefully using this as your basis should make it work better, though it will also require a land connection back to Germany or friendly Axis territory to work.

Let me know how you get on.
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 »

As far as I can see that is exactly how I set up mine. What is supposed to happen with this script? Are the units supposed to get moved back into surrendering sides territory ?

I will try to explain better what I want to happen because I think I explained it poorly and incorrectly.

Germany is fighting USSR and Britain.

USSR is fighting Germany and USA.

Germany and USSR should make peace but they should both continue fighting their other wars against Britain and USA.

When I use the surrender script Germany seems to surrenders to all its enemies and the german units are removed from the game.

I would like for the german units on USSR territory to not surrender/disappear but to teleport or be able to move back to German territory.
User avatar
BillRunacre
Posts: 6534
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

Re: General Editor/modding questions

Post by BillRunacre »

Yes the units should be moved back to friendly territory outside the USSR. Have you got #ARMISTICE= 1 in your script?

__________________________

Thanks for explaining, an alternative, albeit imperfect, approach would be to try a LOOP script for each side to move their troops back into their home country.

Make these TYPE= 2 so that they will fire whenever one side crosses the border, i.e. not just once, and with them triggered by a Decision event so that they don't happen too early in the war!

It's not a perfect solution because this won't make the USSR and Germany be at peace, so their air units could still duel for the skies, but it will prevent one from invading the other.
Follow us on Twitter: https://twitter.com/FurySoftware

We're also on Facebook! https://www.facebook.com/FurySoftware/
El_Condoro
Posts: 597
Joined: Sat Aug 03, 2019 4:35 am

Re: General Editor/modding questions

Post by El_Condoro »

With a surrender script, one country will surrender, so it's not possible to have both sides stay in the war. They can be reactivated using a mobilization2.txt script so perhaps the side that 'surrenders' immediately re-mobilizes. The problem with that will be that the units will be positioned according to their starting hexes, so that's probably not a solution, either.
ORB & CROWN Fantasy Warfare Mod for Strategic Command
Download for War in Europe or World at War - YouTube - Discord
Ason
Posts: 368
Joined: Fri Nov 29, 2013 11:14 am

Re: General Editor/modding questions

Post by Ason »

Yes Armistice =1.
I also tried with Loop script but with surrender script all the units disappear even when on their own territory iirc.

It is possible to have them fighting their own wars, so the question is just how to get there without surrender script.
Can I perhaps change belligerence or any other script to make two nations not be at war anymore ?
User avatar
BillRunacre
Posts: 6534
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

Re: General Editor/modding questions

Post by BillRunacre »

In the USSR's Surrender script, changing the #REMOVE= line to 0 should resolve this for you:

#REMOVE= Remove units when there is an armistice? (values range [0, 3]; None=0; Land=1; Naval=2; All=3)

Who are they at war with after that point?
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 »

I must have done something wrong before because I know I tried with REMOVE = 0, but I tried again and it works, german units gets moved back into germany.

However Germany surrenders to both USSR and Britain, but I made Germany and Britain start the war again the turn after.

Only problem is the German units on british soil gets moved back aswell but I guess I can live with that, as it seems there is no way around surrendering to all enemies at once.
User avatar
BillRunacre
Posts: 6534
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

Re: General Editor/modding questions

Post by BillRunacre »

Yes, that is a problem that there isn't really a way around, as either Germany or the USSR have to have a surrender script run, and either will move units.

There is an alternative approach, and that would be to have a TERRITORY script creating a one hex wide buffer zone between the USSR and Germany. It will have to be set to transfer to a new neutral country (use a suitable country name from the list) and then just use a house rule that neither side can declare war or use diplomacy against this new neutral.

Couple this with the LOOP scripts I mentioned previously to remove Axis units from the USSR and vice versa.

It's not ideal perhaps, but it is a way to approximate the situation you're trying to create.
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 »

Can someone explain how to make a nation surrender without losing its territory ? I've tried both surrender#1 and #2 scripts but nothing seems to work, the nation simply doesnt surrender.

on the surrender#2 script I tried to set armistice = 1 (which I think is exactly what i want), but that only works if i set recipient ID to the same ID as the surrendering country (not sure if this is bugged) so I think the game thinks that the country is surrendering to itself and not the enemy ?

If I set armistice = 1 and then set recipient ID to be the enemy the editor wont let me update the script..

(I know i asked about similar thing before but its been a few years since i worked in editor)

This Surrender#2 doesnt work for some reason, no idea why(doesnt let me update it):
{
#NAME= Country A - 60% NM Surrenders to Country B
#POPUP=
#IMAGE=
#SOUND= teletype_1.ogg
#FLAG= 1
#TYPE= 1
#AI= 0
#LEVEL= 0
#GV= 1[1,100]
#LINK= 402[1] (linked to a decision event which asks the player about the surrender)
#TRIGGER= 100
#COUNTRY_ID= 115
#RECIPIENT_ID= 116 (only way to get this script to update (but then do nothing ingame) is to set this to same ID as #COUNTRY_ID)
#ARMISTICE= 1
#REMOVE= 0 (remove = 1 also doesnt fix it)
#DATE= 1941/01/01
#VARIABLE_CONDITION= 115 [1] [100] [0]
#CONDITION_POSITION= 0,0 [0,0] [0,0] [0] [0]
}

This Surrender#1 script works but it transfers entire nations country to the enemy (which is i why i guess I need Surrender#2 with the armistice option ?)
{
#NAME= Country A surrenders
#POPUP=
#IMAGE=
#SOUND=
#FLAG= 1
#TYPE= 1
#AI= 0
#LEVEL= 0
#GV= 1[1,100]
#LINK= 402[1]
#TRIGGER= 100
#COUNTRY_ID= 115 (Country A)
#RECIPIENT_ID= 116 (Country B)
#SURRENDERED_TO= 2
#MAP_POSITION= 44,82 (even though I only set 1 map position, the entire country is transfered to Country B)
}
Post Reply

Return to “Scenario Design and Modding”