Page 1 of 2

Basic Questions

Posted: Thu Nov 06, 2014 11:44 pm
by LordValentai
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!

Re: Basic Questions

Posted: Fri Nov 07, 2014 8:27 am
by rbodleyscott
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.
You need to create a new campaign using the dialogue that comes up when you open the Editor.

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.
2. How do I edit the weapon effects and ranges of the different units, eg to make artillery more effective at shorter range.
To do this you will have to edit scripts. Mostly in CombatTools.BSF. The main functions you would need to edit are

GetShootingWeaponModifier()

GetImpactPOA()

GetMeleePOA()

3. When I add to the squads file, can I just put in new units underneath?
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. See

https://sites.google.com/site/battleaca ... llfeatures

in the section on Build 0001.
Are they referenced elsewhere?
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.
4. Which armylist.txt file do I edit for skirmish battles? Can I create new ones?
You should either clone one of the existing ArmyList.txt files in your new campaign, or start a new one from scratch.

Re: Basic Questions

Posted: Fri Nov 07, 2014 10:00 am
by LordValentai
Great, thanks! I'll give it a try tomorrow.

Re: Basic Questions

Posted: Sat Nov 08, 2014 12:52 am
by LordValentai
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!

Re: Basic Questions

Posted: Sat Nov 08, 2014 7:54 am
by rbodleyscott
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?
It ought to be the right place.

Can you post the changed code here please?

Re: Basic Questions

Posted: Sat Nov 08, 2014 8:11 am
by LordValentai
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.

Re: Basic Questions

Posted: Sat Nov 08, 2014 8:21 am
by rbodleyscott
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.

Re: Basic Questions

Posted: Sat Nov 08, 2014 8:32 am
by rbodleyscott
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.

Re: Basic Questions

Posted: Sat Nov 08, 2014 9:06 am
by LordValentai
Thank you so much for your help. :)

Re: Basic Questions

Posted: Sat Nov 08, 2014 9:21 am
by rbodleyscott
LordValentai wrote:Thank you so much for your help. :)
We may have to wait a while for Pip's reply. He is in North America and it is the weekend.

Re: Basic Questions

Posted: Sat Nov 08, 2014 9:36 am
by LordValentai
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. :)

Re: Basic Questions

Posted: Mon Nov 10, 2014 5:34 pm
by rbodleyscott
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.

Re: Basic Questions

Posted: Mon Nov 10, 2014 6:39 pm
by LordValentai
Great thanks, I'll try that tonight! :)

Re: Basic Questions

Posted: Tue Nov 11, 2014 10:14 am
by LordValentai
Richard,

Worked perfectly.

Now I have to tone it down...it's like I gave them breach-loading 75s! :p

Re: Basic Questions

Posted: Tue Nov 11, 2014 10:39 am
by rbodleyscott
LordValentai wrote:Richard,

Worked perfectly.

Now I have to tone it down...it's like I gave them breach-loading 75s! :p
LOL, I wasn't going to say anything but yes.

Re: Basic Questions

Posted: Wed Nov 12, 2014 5:11 am
by LordValentai
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!

Re: Basic Questions

Posted: Wed Nov 12, 2014 8:11 am
by rbodleyscott
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;
}

Re: Basic Questions

Posted: Wed Nov 12, 2014 9:19 am
by LordValentai
Great, thanks for your help!

Re: Basic Questions

Posted: Sat Nov 15, 2014 10:48 am
by LordValentai
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

Re: Basic Questions

Posted: Sat Nov 15, 2014 11:02 am
by rbodleyscott
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?
The blue appearance means that the texture is missing.

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.