A couple of little questions.

Discussion in 'Modding' started by Ftoomsh, May 17, 2017.

  1. Ftoomsh

    Ftoomsh Active Member

    1. Does anyone know what the value gc_economy_exp does?

    In the latest patch it has been changed;
    from gc_economy_exp = 0.00002;
    to gc_economy_exp = 0.0001

    Notice the different number of decimal places. What is this value and what does it do? Anyone know?

    2. In the new version of the country.script line 2280 is new I think:

    Here it is in context (I have bolded it);

    procedure AddOfficersFormationInfNoOfficersExt(var country : TCountry; var ind : Integer; const u0 : String);
    begin
    if (ind>=gc_country_maxofficers) then
    begin
    ErrorLog('AddOfficersFormationInfNoOfficersExt : officers[out of bounds]');
    exit;
    end;
    var cid : Integer = country.id;
    if (_country_IsCountryMember(cid, u0)) then
    begin
    procedure AddOfficersFormationInf(var country : TCountry; ind : Integer; var iformationtype : Integer; const sformationtype, m0, m1, m2, m3, m4 : String);
    begin
    country.officers[ind].formations[iformationtype].stype := sformationtype;
    country.officers[ind].formations[iformationtype].masks[0] := m0;
    country.officers[ind].formations[iformationtype].masks[1] := m1;
    country.officers[ind].formations[iformationtype].masks[2] := m2;
    country.officers[ind].formations[iformationtype].masks[3] := m3;
    country.officers[ind].formations[iformationtype].masks[4] := m4;
    iformationtype := iformationtype+1;
    end;
    var i : Integer;
    country.officers[ind].officersid := u0;
    country.officers[ind].drummersid := u0;
    if (_country_IsCountryMember(cid, u0)) then begin country.officers[ind].units := u0; i:=i+1; end;
    var iformationtype : Integer;
    AddOfficersFormationInf(country, ind, iformationtype, 'LINE', 'LINE36', 'LINE72', 'LINE120', 'LINE196', 'LINE400');
    AddOfficersFormationInf(country, ind, iformationtype, 'SQUARE', 'SQUARE36', 'SQUARE72', 'SQUARE120', 'SQUARE196', 'SQUARE400');
    AddOfficersFormationInf(country, ind, iformationtype, 'KARE', 'KARE36', 'KARE72', 'KARE120', 'KARE196', 'KARE400');
    ind := ind+1;
    end;
    end;

    Any suggestions on why this new line is necessary and what it does?

    3. I have also done something quite silly (it happens a lot) which is a kludge to stop archers' fire arrows damaging stone walls. Since stone walls were defined as structures, I redefined them as made of iron (silly I know) so that fire arrows could not damage them. Then I had to allow grenadiers to attack iron objects with grenades so they could still attack walls. This actually means grenadiers can throw grenades at artillery pieces which is quite funny. Maybe I will allow this, maybe not, haven't decided yet.

    But what has happened is that now you can't make a gate in a stone wall. I suspect because the wall needs to be structure to allow the new structure, the gate to go over the top of it.

    Hmmm, I am stuck in a kind scissors-paper-stone "incompatible logic" triangle, LOL.

    The problem all starts with silly definition of the wall as a structure (or maybe not so silly given the gate issue).

    Why does dmsscript. global do this?

    gc_obj_material_count = 9;
    gc_obj_material_none = 0;
    gc_obj_material_body = 1;
    gc_obj_material_building = 2;
    gc_obj_material_wood = 3;
    gc_obj_material_stone = 3;
    gc_obj_material_ship = 4;
    gc_obj_material_iron = 5;
    gc_obj_material_woodwall = 6;
    gc_obj_material_water = 7;

    Notice that wood and stone material both indexed to 3. This does not seem logical. Should I redefine these and give stone it's own unique material index?

    I was thinking;

    gc_obj_material_count = 9;
    gc_obj_material_none = 0;
    gc_obj_material_body = 1;
    gc_obj_material_building = 2;
    gc_obj_material_wood = 3;
    gc_obj_material_ship = 4;
    gc_obj_material_iron = 5;
    gc_obj_material_woodwall = 6;
    gc_obj_material_water = 7;
    gc_obj_material_stone = 8;

    Would this help me solve the archers and the gate issue, maybe? With other changes of course.
     
  2. A. Soldier

    A. Soldier Active Member

    Maybe it's a line for helping officers from captured nations be able to form your formations as well?

    As in, if you're playing for example Austria, and you capture Polish workers and build their buildings and produce their officers, you can form your units' formations with their officers.

    I am not 100% entirely sure tho, just speculating.
     
  3. Original-Cossacks-Player

    Original-Cossacks-Player Active Member

    This wouldn't happen to be for the market trade changes they re-balanced?
     
  4. Wralth

    Wralth Member

    Those values are called in res.script for weighting how quickly the price of items moves around as you use the market.
     
  5. Ftoomsh

    Ftoomsh Active Member

    Thank you, that's interesting. It won't affect OCMOD3's flat market but if we put another option in for the market (a version of General WVPM's Realistic market) then this could have an impact.
     
  6. Wralth

    Wralth Member

    about the wall building thing, does it happen if you place walls with the editor or if you build them with peasants? Cheated walls dont connect > no gates possible
     
  7. Ftoomsh

    Ftoomsh Active Member

    I tested it in a millions game. So they were real walls built by peasants. Change the wall's definition from structure and it seems one cannot run the gate upgrade. A gate is an upgrade of a wall. That's a strange way to do it but that's how the devs did the gate.
     
  8. Wralth

    Wralth Member

    Well i guess then you have to edit the function that enables the gate upgrade. iirc it checks for other wall parts in the proximity so thats that.
     
  9. A. Soldier

    A. Soldier Active Member

    Why would that be strange? The Age of Empires and Age of Mythology series of games also does this, how is this any different?

    You build a wall, you click on it and you get an upgrade to a Gate if the wall section is big enough.
     
  10. Ftoomsh

    Ftoomsh Active Member

    To me, it would be more logical to have gates built like walls or buildings. The gate would be in the peasants' build menu. It could be implemented with options available;

    (a) you build a gate where you reckon you will need a gate and then connect wall sections to it afterwards.
    (b) you build a wall and later decide you need a gate or gates. You click the peasants to build a gate in the wall. They work to dismantle the wall sections (quickly) and then build a gate. It costs no more stone as they use the existing stone.
    (c) you lay a wall foundation with peasants some way from the projected wall and then select a few more peasants and lay un-built gates in the un-built wall. Peasants then build it all following the foundations template.

    This would all look much more realistic I think and give the player options.

    While we are talking about templates why not allow players to create personalized multiple build templates and also allow players to rotate them? Like Supreme Commander / Forged Alliance does? For example, the player could make a template with four gates in a line (since one is never enough for big armies). The player could then rotate this to four positions (by 45 degrees each time) and then place it. The player could make a template with 4 houses and place this 6 times (with a build queue allowance of 24 as in OCMOD3) for 24 houses.
     
  11. Wralth

    Wralth Member

    It might be more realistic but there is no gate building animation so there is your first problem lol.
     
    A. Soldier likes this.
  12. A. Soldier

    A. Soldier Active Member

    Basically what Wraith wrote.

    It complicates wall/gate building on a level I am not sure the devs would be happy to take on.
     
  13. Ftoomsh

    Ftoomsh Active Member

    Considering all the other things they have built it would not be that difficult for the developers. But I guess I am whistling in the wind.