19th Century Mod

Discussion in 'Modding' started by Loner, Feb 17, 2019.

  1. Loner

    Loner Well-Known Member

    Mexican Units
    Mexicans.JPG
    Militia.....................Cazadore................Fusilier...................Grenadier.................Guard......................Officer..................Standard Bearer................Lancer.........................Hussar.....................General.
     
    ComDiv, Johny, Awar and 2 others like this.
  2. Fedot

    Fedot Active Member

    Very good combat units! Great!
     
    Loner likes this.
  3. Fedot

    Fedot Active Member

    Hi Loner, which nation might be next in mod, and when might an update to your very good mod
     
  4. Loner

    Loner Well-Known Member

    Hi Fedot, I won't be adding any more new Nations, sorry, I've gone back to updating the existing ones using Awars models, I've got about six to do then I'll be looking at the Artillery graphics that Awar has produced, thanks for your interest.:)
     
  5. Fedot

    Fedot Active Member

    Many Thanks To the Loner! But if the answer can be given, what are the names of those six countries that can be updated with Awar models
     
  6. Loner

    Loner Well-Known Member

    Switzerland, Scotland, America, Maratha, Ukraine and Turkey ( now known as Ottoman ).;)
     
  7. Fedot

    Fedot Active Member

    Thank you so much for your good answer! A very interesting choice of nations
     
    Loner likes this.
  8. Loner

    Loner Well-Known Member

    Bit of a strange one, all my units are given 1000 hp so after engaging the enemy the hp will drop depending on the damage received, well not always the case, a random check on individual units I found that most had gone down in hp but one had actually gone up to 1050, any ideas anybody.:confused:
     
  9. Awar

    Awar Well-Known Member

    I've seen it before. It seemed to me that there is a limit in setting the maximum hp. For your case, you can reduce the hp and attack value. :)
     
    Loner likes this.
  10. Loner

    Loner Well-Known Member

    Thank you Awar.;)
     
  11. Loner

    Loner Well-Known Member

    Wanted to add this feature which lets the A.I produce lines of infantry instead of columns,

    if (gPlayer[plInd].aiData.officer17 <> 0) and (gPlayer[plInd].aiData.drummer17 <> 0) then
    _ai_CreateOfficerSquad(gPlayer[plInd].aiData.officer17, gPlayer[plInd].aiData.drummer17, k, true, bcen18);

    but this is all I can find in progresswarai

    if (gPlayer[plInd].aiData.officer17 <> 0) and (gPlayer[plInd].aiData.drummer17 <> 0) then
    _ai_CreateOfficerSquad(gPlayer[plInd].aiData.officer17, gPlayer[plInd].aiData.drummer17);
     
  12. Awar

    Awar Well-Known Member

    You need to go to the function itself
    3593
    [*] = ;// _ai_CreateOfficerSquad
    [*] = ;//
    [*] = ;procedure _ai_CreateOfficerSquad(offHnd, drumHnd : Integer);


    formType - variable defines the type of formation

    You can assign the value 0 to the variable after the block

    [*] = ;
    [*] = ; // find most compact formation
    [*] = ; var formType : Integer = -1;

    [*] = ; var min : Integer = gc_MaxInt;
    [*] = ; for i := 0 to gc_country_maxformationcount-1 do
    [*] = ; if gCountry[newcid].officers[offInd].formations.masks[0] <> '' then
    [*] = ; begin
    [*] = ; var formInd : Integer = _misc_GetFormationIndexBySID(gCountry[newcid].officers[offInd].formations.masks[0]);
    [*] = ; if formInd >= 0 then
    [*] = ; begin
    [*] = ; var w : Integer = gFormation[formInd].width;
    [*] = ; var h : Integer = gFormation[formInd].height;
    [*] = ; if w+h < min then
    [*] = ; begin
    [*] = ; min := w+h;
    [*] = ; formType := i;
    [*] = ; end;
    [*] = ; end;
    [*] = ; end;
    [*] = ;

    formType := 0;

    The block will become superfluous and you can delete it or enclose it in {}


    [*] = ; {var min : Integer = gc_MaxInt;
    [*] = ; for i := 0 to gc_country_maxformationcount-1 do
    [*] = ; if gCountry[newcid].officers[offInd].formations.masks[0] <> '' then
    [*] = ; begin
    [*] = ; var formInd : Integer = _misc_GetFormationIndexBySID(gCountry[newcid].officers[offInd].formations.masks[0]);
    [*] = ; if formInd >= 0 then
    [*] = ; begin
    [*] = ; var w : Integer = gFormation[formInd].width;
    [*] = ; var h : Integer = gFormation[formInd].height;
    [*] = ; if w+h < min then
    [*] = ; begin
    [*] = ; min := w+h;
    [*] = ; formType := i;
    [*] = ; end;
    [*] = ; end;
    [*] = ; end;}

    [*] = ; formType := 0;
     
    Loner likes this.
  13. Loner

    Loner Well-Known Member

    Thank you once again Awar, I'd be lost without your help.:)
     
    Awar likes this.
  14. Loner

    Loner Well-Known Member

    Trying to get the 'Heal all live units' to require a General to activate but game crashes before loading, this is what I've added in country.script:

    _country_AddUpgrade(country, upgplace+'.26', 1, gc_upg_tooltiptype_none, gc_upg_type_healing, 50, cTrue, 1000, 3, 0, ind, 0, 0, 0, 1000, 0, 0, bAddIfNotExist, 0, 0, 0, '', '', '', '', '', '', '', '', '', '', True, req'general', '', '', '', '', '', '', '');
    for k:=0 to gc_MaxUnitsArr-1 do _country_AddUpgradeSArrParam2MemberIfExists(country, ind-1, garr_UnitsAll[k]);

    any ideas.
     
  15. Awar

    Awar Well-Known Member

    Adding an upgrade with conditions:
    _country_AddUpgradeWithAccessControl
     
    Loner likes this.
  16. Loner

    Loner Well-Known Member

    Once again Awar, thank you.:)
     
  17. Loner

    Loner Well-Known Member

    Must be missing something,

    _country_AddUpgradeWithAccessControl(country, upgplace+'.26', 1, gc_upg_tooltiptype_none, gc_upg_type_healing, 50, cTrue, 1000, 3, 0, ind, 0, 0, 0, 1000, 0, 0, bAddIfNotExist, 0, 0, 0, '', '', '', '', '', '', '', '', '', '', True, csid+'gen', '', '', '', '', '', '', '');

    this loads but the general is not needed for the upgrade.
     
  18. Awar

    Awar Well-Known Member

    I tested it on another upgrade, everything works in the mod
    _country_AddUpgradeWithAccessControl(country, upgplace+'.7', 1, gc_upg_tooltiptype_none, gc_upg_type_priceperc, 0, cTrue, 500, 2, 0, ind, 0, 7300, 0, 1220, 0, 0, bAddIfNotExist, 0, 0, 0, 'fishboat', '', '', '-85', '', '', '', '', '', '', True, 'general19' + csid, '', '', '', '', '', '', '');
     
    Loner likes this.
  19. Loner

    Loner Well-Known Member

    In your debt as always Awar, had general and csid in the wrong order,:oops:, thank you again.:)
     
    Fedot and Awar like this.
  20. Loner

    Loner Well-Known Member

    Hoping to update the mod, using Awars fantastic models, in the next couple of weeks.;)
     
    Awar and Fedot like this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice