Basic Questions
Moderators: rbodleyscott, Slitherine Core, Gothic Labs
-
LordValentai
- Corporal - 5 cm Pak 38

- Posts: 39
- Joined: Thu Nov 06, 2014 1:51 am
Basic Questions
Hi there!
Got some probably very easy and obvious modding questions.
1. Which files do I edit? I don’t have a folder in ‘Documents’, should I create one, or should I be editing the files in the steam directory? I don’t want to screw up my install.
2. How do I edit the weapon effects and ranges of the different units, eg to make artillery more effective at shorter range.
3. When I add to the squads file, can I just put in new units underneath? Are they referenced elsewhere?
4. Which armylist.txt file do I edit for skirmish battles? Can I create new ones?
Thanks!
Got some probably very easy and obvious modding questions.
1. Which files do I edit? I don’t have a folder in ‘Documents’, should I create one, or should I be editing the files in the steam directory? I don’t want to screw up my install.
2. How do I edit the weapon effects and ranges of the different units, eg to make artillery more effective at shorter range.
3. When I add to the squads file, can I just put in new units underneath? Are they referenced elsewhere?
4. Which armylist.txt file do I edit for skirmish battles? Can I create new ones?
Thanks!
-
rbodleyscott
- Field of Glory 2

- Posts: 28320
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Basic Questions
You need to create a new campaign using the dialogue that comes up when you open the Editor.LordValentai wrote:Hi there!
Got some probably very easy and obvious modding questions.
1. Which files do I edit? I don’t have a folder in ‘Documents’, should I create one, or should I be editing the files in the steam directory? I don’t want to screw up my install.
The new campaign will be placed in /My Documents/My Games/Pikeandshot/Campaigns (if it is SP) or /My Documents/My Games/Pikeandshot/Multiplayer (if it is MP)
You can select to make it a clone of an existing campaign.
However, this will only copy across the scenarios.
If you are going to change any scripts you need to copy the affected script (.bsf) files across too. They have to go into the correct places in your new campaign's folder. This is important. See the chart at the end of this document
http://www.slitherinebravo.net/GameWiki ... tub_engine
If you add new versions of any script files, these will automatically override the vanilla versions when you run a scenario from your new campaign.
To do this you will have to edit scripts. Mostly in CombatTools.BSF. The main functions you would need to edit are2. How do I edit the weapon effects and ranges of the different units, eg to make artillery more effective at shorter range.
GetShootingWeaponModifier()
GetImpactPOA()
GetMeleePOA()
Do not add to the Squads file in the main directory. If you put a squads file in your new campaign, the units in it will automatically be appended. See3. When I add to the squads file, can I just put in new units underneath?
https://sites.google.com/site/battleaca ... llfeatures
in the section on Build 0001.
You will also need a text1.txt file in your new campaign. Each unit will need an IDS_UNITNAME string and an IDS_UNITINFO String. See the main Text1.txt in /Pike & Shot/Data/Text for examples.Are they referenced elsewhere?
You should either clone one of the existing ArmyList.txt files in your new campaign, or start a new one from scratch.4. Which armylist.txt file do I edit for skirmish battles? Can I create new ones?
Richard Bodley Scott


-
LordValentai
- Corporal - 5 cm Pak 38

- Posts: 39
- Joined: Thu Nov 06, 2014 1:51 am
Re: Basic Questions
Great, thanks! I'll give it a try tomorrow.
-
LordValentai
- Corporal - 5 cm Pak 38

- Posts: 39
- Joined: Thu Nov 06, 2014 1:51 am
Re: Basic Questions
Hi Richard,
Thanks for all your assistance. Almost everything is working great.
One minor issue I'm having is that making a copy of 'shooting_logic.bsf', making an edit, and putting it into documents\my games\pikeandshot\campaigns\test\data\battle\scripts it's not seeming to have any effect.
I changed the minimum firepower and skew for artillery, but it doesn't seem to be reflected in game.
Is this the right place for it, is there something else I need to do to make the script activate or something else entirely?
Thanks!
Thanks for all your assistance. Almost everything is working great.
One minor issue I'm having is that making a copy of 'shooting_logic.bsf', making an edit, and putting it into documents\my games\pikeandshot\campaigns\test\data\battle\scripts it's not seeming to have any effect.
I changed the minimum firepower and skew for artillery, but it doesn't seem to be reflected in game.
Is this the right place for it, is there something else I need to do to make the script activate or something else entirely?
Thanks!
-
rbodleyscott
- Field of Glory 2

- Posts: 28320
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Basic Questions
It ought to be the right place.LordValentai wrote:Hi Richard,
Thanks for all your assistance. Almost everything is working great.
One minor issue I'm having is that making a copy of 'shooting_logic.bsf', making an edit, and putting it into documents\my games\pikeandshot\campaigns\test\data\battle\scripts it's not seeming to have any effect.
I changed the minimum firepower and skew for artillery, but it doesn't seem to be reflected in game.
Is this the right place for it, is there something else I need to do to make the script activate or something else entirely?
Can you post the changed code here please?
Richard Bodley Scott


-
LordValentai
- Corporal - 5 cm Pak 38

- Posts: 39
- Joined: Thu Nov 06, 2014 1:51 am
Re: Basic Questions
Hi Richard, please see below.
// Artillery more random than other types - but high damage hits less frequent than low damage hits
if ((IsUnitSquadType(me, "Artillery") == 1) || (IsUnitSquadType(me, "Light_Artillery") == 1))
{
skew_type = 1;
minDam = base_damage / 2;
maxDam = base_damage * 3;
}
else
{
skew_type = 1;
minDam = base_damage / 2;
maxDam = base_damage * 3;
maxDam /= 2;
}
Just the bolded bit was changed.
// Artillery more random than other types - but high damage hits less frequent than low damage hits
if ((IsUnitSquadType(me, "Artillery") == 1) || (IsUnitSquadType(me, "Light_Artillery") == 1))
{
skew_type = 1;
minDam = base_damage / 2;
maxDam = base_damage * 3;
}
else
{
skew_type = 1;
minDam = base_damage / 2;
maxDam = base_damage * 3;
maxDam /= 2;
}
Just the bolded bit was changed.
-
rbodleyscott
- Field of Glory 2

- Posts: 28320
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Basic Questions
Hmm, well it ought to work. Of course it will only work when you are playing your "test" campaign. It won't work in other campaigns.
I will try it myself and report back.
I will try it myself and report back.
Richard Bodley Scott


-
rbodleyscott
- Field of Glory 2

- Posts: 28320
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Basic Questions
Hmm, well you are right, it is using the vanilla Shooting_Logic.bsf.
We must be doing something wrong. I will ask Pip. It will no doubt turn out to be something simple.
We must be doing something wrong. I will ask Pip. It will no doubt turn out to be something simple.
Richard Bodley Scott


-
LordValentai
- Corporal - 5 cm Pak 38

- Posts: 39
- Joined: Thu Nov 06, 2014 1:51 am
Re: Basic Questions
Thank you so much for your help. 
-
rbodleyscott
- Field of Glory 2

- Posts: 28320
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Basic Questions
We may have to wait a while for Pip's reply. He is in North America and it is the weekend.LordValentai wrote:Thank you so much for your help.
Richard Bodley Scott


-
LordValentai
- Corporal - 5 cm Pak 38

- Posts: 39
- Joined: Thu Nov 06, 2014 1:51 am
Re: Basic Questions
No rush, obviously.
In the meantime I might edit the file you originally mentioned to increase firepower against infantry. It just seems wrong that I have a pike block 1-2 squares away from my cannons and I get a 0 casualties result from firing.
Still, once again I must thank you for answering all these threads in person. It's great to deal with companies who do this sort of personal service.
In the meantime I might edit the file you originally mentioned to increase firepower against infantry. It just seems wrong that I have a pike block 1-2 squares away from my cannons and I get a 0 casualties result from firing.
Still, once again I must thank you for answering all these threads in person. It's great to deal with companies who do this sort of personal service.
-
rbodleyscott
- Field of Glory 2

- Posts: 28320
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Basic Questions
If you add a copy of $Default.BSF to /My Documents/My Games/PikeandShot/Campaigns/Data/Battle/Scripts it should pick up the rest of your custom scripts. (You will find it in /PikeandShot/Data/Battle/Scripts).
I have tried it with your Shooting_Logic.bsf variant and confirmed that it works.
I have tried it with your Shooting_Logic.bsf variant and confirmed that it works.
Richard Bodley Scott


-
LordValentai
- Corporal - 5 cm Pak 38

- Posts: 39
- Joined: Thu Nov 06, 2014 1:51 am
Re: Basic Questions
Great thanks, I'll try that tonight! 
-
LordValentai
- Corporal - 5 cm Pak 38

- Posts: 39
- Joined: Thu Nov 06, 2014 1:51 am
Re: Basic Questions
Richard,
Worked perfectly.
Now I have to tone it down...it's like I gave them breach-loading 75s! :p
Worked perfectly.
Now I have to tone it down...it's like I gave them breach-loading 75s! :p
-
rbodleyscott
- Field of Glory 2

- Posts: 28320
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Basic Questions
LOL, I wasn't going to say anything but yes.LordValentai wrote:Richard,
Worked perfectly.
Now I have to tone it down...it's like I gave them breach-loading 75s! :p
Richard Bodley Scott


-
LordValentai
- Corporal - 5 cm Pak 38

- Posts: 39
- Joined: Thu Nov 06, 2014 1:51 am
Re: Basic Questions
Richard,
Can I use fractions in the above example? So for instance
{
skew_type = 1;
minDam = base_damage / 1.5;
maxDam = base_damage * 2.5;
}
Is that possible?
Thanks!
Can I use fractions in the above example? So for instance
{
skew_type = 1;
minDam = base_damage / 1.5;
maxDam = base_damage * 2.5;
}
Is that possible?
Thanks!
-
rbodleyscott
- Field of Glory 2

- Posts: 28320
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Basic Questions
LordValentai wrote:Richard,
Can I use fractions in the above example? So for instance
{
skew_type = 1;
minDam = base_damage / 1.5;
maxDam = base_damage * 2.5;
}
Is that possible?
The script language can only handle integers, and rounds down any fractions. See http://www.slitherinebravo.net/GameWiki ... tub_engine
So you would have to write the above as:
{
skew_type = 1;
minDam = base_damage * 2;
minDam /= 3;
maxDam = base_damage * 5;
maxDam /= 2;
}
Richard Bodley Scott


-
LordValentai
- Corporal - 5 cm Pak 38

- Posts: 39
- Joined: Thu Nov 06, 2014 1:51 am
Re: Basic Questions
Great, thanks for your help!
-
LordValentai
- Corporal - 5 cm Pak 38

- Posts: 39
- Joined: Thu Nov 06, 2014 1:51 am
Re: Basic Questions
Richard,
To do my mod I copied over the Italian Wars data. However, when I try and pull in assets from other modules (using the TYW French pike/shot for instance) I get units in all blue, as shown in the attachment.
What do I have to do to get the stuff over to this mod module?
Thanks
To do my mod I copied over the Italian Wars data. However, when I try and pull in assets from other modules (using the TYW French pike/shot for instance) I get units in all blue, as shown in the attachment.
What do I have to do to get the stuff over to this mod module?
Thanks
- Attachments
-
- Blue unit errors
- PIKEANDSHOT Error.jpg (253.42 KiB) Viewed 7906 times
-
rbodleyscott
- Field of Glory 2

- Posts: 28320
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Basic Questions
The blue appearance means that the texture is missing.LordValentai wrote:Richard,
To do my mod I copied over the Italian Wars data. However, when I try and pull in assets from other modules (using the TYW French pike/shot for instance) I get units in all blue, as shown in the attachment.
What do I have to do to get the stuff over to this mod module?
In skirmish mode the whole army is skinned with one texture set - from one texture folder - as specified in the army list by the SKIN line.
You appear to be using IW_French for this example.
So if you want to use (for example) the TYW French pike and shot texture with the IW_French skin, you will have to copy the Pike_Musket_French@.dds texture from the TYW_French folder into the IW_French folder in your mod campaign. (My Documents/My Games/Campaigns/YourCampaign/Data/Battle/UnitTextures/IW_French)
The texture filename is the AssetFileName from the squads file with the suffix @.dds appended.
Likewise any other units you want to use with an army skinned using the "SKIN IW_French" command in the ArmyList.txt file will need to have their textures added to the IW_French folder in your mod campaign if it doesn't already have them.
Looks like you will also need to find a suitable Pike@.dds (e.g. from ECW_Royalist) and Mob@.dds (e.g. from TYW_Polish) from one of the existing folders. You may want to edit the flags in the texture - you should be able to swap in some from one of the French units if you convert the .dds to a .tga, edit it and then convert it back.
Richard Bodley Scott

