Page 1 of 3 123 LastLast
Results 1 to 20 of 55

Thread: Creating a World - Functional Grape Shot

  1. #1
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Creating a World - Functional Grape Shot

    In it’s wisdom, CA provided us with the banana shot and through the crusades campaign the grape shot as well (must have been a fruit day). Whereas the first one works quite well, weird as it is, the second one does not.

    I will now try to simplify the way to achieve functionality for this shot variety, explaining the connections between files on the way.


    -------------------------------------------------

    In figure 1 I have taken the entry for the NE Bombard unit from the crusades campaign and highlighted the regular shot and the grapeshot.

    type NE Bombard
    dictionary NE_Bombard ; Bombard
    category siege
    class missile
    voice_type Light
    banner faction main_missile
    banner holy crusade
    soldier NE_Bombard_Crew, 16, 2, 1
    engine bombard
    attributes sea_faring, hardy, can_withdraw, gunpowder_unit, cannon, artillery
    formation 1.5, 1.5, 3, 3, 3, square
    stat_health 1, 0
    stat_pri 7, 3, no, 0, 0, melee, artillery_gunpowder, piercing, knife, 25, 1.8
    ;stat_pri_ex 0, 0, 0
    stat_pri_attr no
    stat_sec 55, 3, bombard_shot, 325, 30, siege_missile, artillery_gunpowder, blunt, none, 25, 1
    ;stat_sec_ex 0, 0, 0
    stat_sec_attr ap, bp, area, launching
    stat_ter 65, 3, grape_shot, 115, 10, siege_missile, artillery_gunpowder, blunt, none, 26, 1
    ;stat_ter_ex 0, 0, 0
    stat_ter_attr ap, launching
    Figure 1

    Figure 2 shows the entry for grape shot in the descr_projectiles file. Note the highlighted entry <area_effect> entry at the bottom. This means that a certain effect is needed for this shot.

    projectile grape_shot

    ;effect bombard_set
    end_effect bullet_impact_ground_set
    end_man_effect man_impact_tiny_set
    end_package_effect bullet_impact_wall_set
    end_shatter_effect bullet_impact_ground_set
    end_shatter_man_effect man_impact_tiny_set
    end_shatter_package_effect bullet_impact_wall_set

    damage 120
    damage_to_troops 100
    radius 0.3
    mass 1.0
    area 2.0
    accuracy_vs_units 0.0725
    accuracy_vs_buildings 0.0455
    accuracy_vs_towers 0.025
    min_angle -15
    max_angle 25
    velocity 20 50
    bounce 0.01 0.01 0.93 0.5
    grapeshot
    ; self_explode <prob> <min sec> <max sec> [<area effect>]
    self_explode 1.0 0.1 0.1 grape_shot
    display aimed
    ;effect_only
    ; Stuck model not used at the mo, shatter effect is better, but adding some shatter debris for ground impact would be good?
    ;stuck
    effect_only
    Figure 2



    In figure 3 the effect for the grape shot is detailed. And here was the major fault: the highlighted musket_bullet entry was originally “grape_shot”. This caused a circular reference (known to anybody who has worked with spreadsheets) between the descr_projectile file and the descr_area_effects. Changing it to the entry shown below fixes this.

    <area_effect>
    <name>grape_shot</name>
    <type>projectile</type>
    <projectile_type>musket_bullet</projectile_type>
    <explosion_force_min>0.5</explosion_force_min>
    <explosion_force_max>1.5</explosion_force_max>
    <preserve_momentum>true</preserve_momentum>
    <direction>horizontal</direction>
    <scatter_angle>45</scatter_angle>
    <projectile_number>60</projectile_number>
    </area_effect>
    Figure 3

    The spoilers underneath (figure 4) show a movie from our 1648 mod and a screenshot during research for this function - the projectiles on their way to the hapless unit.

    Spoiler for the movie

    Spoiler for the picture
    Figure 4

    Should you wish to transfer this feature to a mod, the following files (found in the attachments) will be required:

    1.Descr_area_effects.xml - contains the corrected entry
    2.Descr_flaming_projectiles - kingdoms file for flaming projectiles
    3.Descr_projectiles.txt - kingdoms file for projectiles
    4.Grape.cas - 3D model for the grape shot, the texture is a standard ‘vanilla’ file
    5.Shared.txt - contains the tooltip (custom battle) for the grapeshot
    6.Battlepage_03.tga - contains the special function button for grape shot
    7.Battle.sd - contains the location details for the special function graphic


    One note for the user: due to some programming quirk the use of grape shot requires that either a flaming or an exploding projectile is present. In the case of bombard_shot as in figure 1 CA provided us with the flaming_bombard_projectile. Other cannon shots have not got that second type of projectile and therefore the grapeshot will not work.

    I have added “exploding_serpentine_shot” and “exploding_culverin_shot” to the descr_projectile file. You can therefore use the grape shot feature with any cannon that uses either serpentine_shot or culverin_shot. Other varieties can be added according to your need and knowledge.


    This has been another tutorial by gigantus

    Download Link, contains the following:
    - GrapeShot = files discussed in this article
    - Creating a World - Functional Grape Shot = this article
    .
    Last edited by Gigantus; June 30, 2017 at 07:22 AM. Reason: media updated










  2. #2

    Default Re: Creating a World - Funtinal Grape Shot

    I was jut waitng for you to get "fruity".........................lo!

  3. #3
    Condottiere SOG's Avatar Domesticus
    Join Date
    Dec 2006
    Location
    Somewhere in Europe
    Posts
    2,275

    Default Re: Creating a World - Functional Grape Shot

    Is this feature only compatible with Kingdoms?
    Erasmo
    Operating System: Windows 7 Home Premium 64-bit (6.1, Build 7601)
    System Manufacturer: ASUSTeK Computer Inc.
    System Model: G73Sw
    Processor: Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz (8 CPUs), ~2.0GHz
    Memory: 12288MB RAM
    Available OS Memory: 12266MB RAM
    Page File: 2634MB used, 21881MB available
    Windows Dir: C:\Windows
    DirectX Version: DirectX 11
    DX Setup Parameters: Not found
    User DPI Setting: Using System DPI
    System DPI Setting: 96 DPI (100 percent)
    DWM DPI Scaling: Disabled
    DxDiag Version: 6.01.7601.17514 32bit Unicode

  4. #4
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Re: Creating a World - Functional Grape Shot

    I suppose if you add all the kingdoms files mentioned, then it could work with medieval2 as well, but I never tried.
    It is not in the 'vanilla' files, that much I know. Not sure (don't think so) if it depends on the exe. It is simply a new area_effect and projectile, so the exe will not have changed in that aspect.










  5. #5

    Default Re: Creating a World - Functional Grape Shot

    Nice one, gigantus. Will try this out.
    Son of PW

  6. #6
    Nirnaeth Arnoediad's Avatar Vive l'Empereur !
    Join Date
    Jun 2009
    Location
    In the greatest civilization
    Posts
    807

    Default Re: Creating a World - Functional Grape Shot

    I've tried to implement grape_shot in med2 (not KG) and it CDT cause the "grapeshot" entry in the EDU. This entry ;
    bounce 0.01 0.01 0.93 0.5
    grapeshot
    ; self_explode <prob> <min sec> <max sec> [<area effect>]
    The log said : excepted display
    When I remove this unknown line for the game, the mod launch, but in battle no grapeshot, no icon, no chanes in the unit 'attribute !

    However I've read this thread 3 times...

  7. #7
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Re: Creating a World - Functional Grape Shot

    Can only repeat what I said in post #4:
    I suppose if you add all the kingdoms files mentioned, then it could work with medieval2 as well, but I never tried.
    It is not in the 'vanilla' files, that much I know. Not sure (don't think so) if it depends on the exe. It is simply a new area_effect and projectile, so the exe will not have changed in that aspect.
    Your lines are from descr_projectiles, but I guess it is not compatible with medieval2, only kingdoms.










  8. #8
    Nirnaeth Arnoediad's Avatar Vive l'Empereur !
    Join Date
    Jun 2009
    Location
    In the greatest civilization
    Posts
    807

    Default Re: Creating a World - Functional Grape Shot

    Ok, thanks.

    I'll tried with KG. Sad for the med2 version of my mod.

  9. #9
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Re: Creating a World - Functional Grape Shot

    Once I get some time I will try it with med2. It appears somewhat puzzling - maybe the EXE balks at the third projectile in the EDU:
    Code:
    stat_ter         65, 3, grape_shot,










  10. #10

    Default Re: Creating a World - Functional Grape Shot

    Shouldn't do - Treb's work perfectly with their Gibbet launching attack.

    Would this work with creating... Say a Repeating Ballista? Or is it still Ribault style firing.

    [ Cry Havoc:: ] - [ link ] - [ An Expanded World Submod for Call of Warhammer ]
    My turban brings all the muslims to the yard and they're like العنصرية ش

  11. #11
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Re: Creating a World - Functional Grape Shot

    Not the faintest idea, but I guess it should be possible. Simply have a look at all the projectiles and the 'big guns'.
    Should be fun to have a serpentine firing greek fire over 200 yards.










  12. #12

    Default Re: Creating a World - Functional Grape Shot

    To be fair, it's hilarious. Tried it, and it works. I'll now test if it's possible to have non siege engine units utilize this.

    [ Cry Havoc:: ] - [ link ] - [ An Expanded World Submod for Call of Warhammer ]
    My turban brings all the muslims to the yard and they're like العنصرية ش

  13. #13

    Default Re: Creating a World - Functional Grape Shot

    thats very nice and very handy for my 18th century mod

    +rep
    Common sense removed due being Disruptive.

  14. #14

    Default Re: Creating a World - Functional Grape Shot

    hey i hope someone can help me...
    because i also added the grapeshot for my colonialism total war mod,
    but my grapeshot looks like this : http://www.youtube.com/watch?v=Bh74b9U6KTM

    i have flying musket bullets now... and not like in your picture above, rocks, or whatever it is, but its black and bigger,
    then the grape_shot in the vid...

    and why do you have to include the model :

    grape.CAS
    when you dont use it ? i mean... how to use it ? its just in its folder but the model from the musket_bullet is used.
    is there someway to change it ?

  15. #15
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Re: Creating a World - Functional Grape Shot

    I included the grape.cas file as it was part of the feature, but then decided to use the musket_bullet projectile. Feel free to design your own projectile using that model.
    The movie is a teaser from the mod 1648 - Der dreissigjährige Krieg where we found out how to implement the grapeshot, the projectile in that mod has been further modified.










  16. #16
    Nirnaeth Arnoediad's Avatar Vive l'Empereur !
    Join Date
    Jun 2009
    Location
    In the greatest civilization
    Posts
    807

    Default Re: Creating a World - Functional Grape Shot

    So the grape.cas is not necessary to use grapeshot ? Can I delete it from my mod ?

  17. #17

    Default Re: Creating a World - Functional Grape Shot

    Quote Originally Posted by Nirnaeth Arnoediad View Post
    So the grape.cas is not necessary to use grapeshot ? Can I delete it from my mod ?
    Yes u can delete it coz it will be then rendered from the .pack files instead after that but the musket one is in role here.
    Last edited by Ishan; August 30, 2010 at 05:17 PM.

  18. #18
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Re: Creating a World - Functional Grape Shot

    I just received a PM in the German forum regarding the projectile:

    It basically mentioned to add this entry in descr_ Projectile.txt


    projectile grape_bullet

    effect grape_model_set
    end_effect bullet_impact_ground_set
    end_man_effect man_impact_tiny_set
    end_package_effect bullet_impact_wall_set
    end_shatter_effect bullet_impact_ground_set
    end_shatter_man_effect man_impact_tiny_set
    end_shatter_package_effect bullet_impact_wall_set

    damage 0
    radius 0
    mass 0.05
    accuracy_vs_units 0.001
    min_angle -60
    max_angle 70
    velocity 30 85
    grapeshot
    display aimed
    effect_only
    And than to change this entry in descr_area_effects.xml:

    <area_effect>
    <name>grape_shot</name>
    <type>projectile</type>
    <projectile_type>grape_bullet</projectile_type>
    <explosion_force_min>0.5</explosion_force_min>
    <explosion_force_max>1.5</explosion_force_max>
    <preserve_momentum>true</preserve_momentum>
    <direction>horizontal</direction>
    <scatter_angle>45</scatter_angle>
    <projectile_number>60</projectile_number>
    </area_effect>
    I haven't tested it yet, but it appears to be in order.










  19. #19

    Default Re: Creating a World - Functional Grape Shot

    yes it is, i have tested it
    Mr. Nice ist gut oder ? er hat das für mich rausgefunden
    Leader of Colonialism Total War
    Thread with first Preview
    First Youtube Trailer


  20. #20
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Re: Creating a World - Functional Grape Shot

    Quote Originally Posted by nessj999 View Post
    yes it is, i have tested it
    Mr. Nice ist gut oder ? er hat das für mich rausgefunden
    Man kann sich auf ihn verlassen (he can be relied upon)










Page 1 of 3 123 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •