Resource icon

Sniper Mod v0.6.1 2016-10-05

This mod adds sniper functionality generically to the game. To enable a unit to
have the sniper features their combat type must be set to UNITCOMBAT_SNIPER.
Two new units have been included with this mod component to demonstrate this
functionality: sniper and modern sniper. The sniper represents the sniper from
the ~1750s to the end of the 1800s or from the American revolution through the
American civil war. The modern sniper represents roughly what modern combat
snipers are today.


Installation Instructions:

1) Unzip this into the "civ4_install_folder\Mods\" folder.
2) Open the CivilizationIV.ini configuration file
3) Change the Mod line to read: Mod = Mods\Sniper Mod
4) Load the game.
5) Then play as normal.

-----Game Play-----
Spoiler :

- Added sniper unit combat type to differentiate snipers from regular military
units

- 25+ INI options allowing players to configure:
- Valid sniper targets
- How terrain affects snipers
and much, much more.


-----Units-----
Spoiler :

- Sniper:
[TAB]- Requires: Rifling Technology
[TAB]- Cost: 165
[TAB]- Combat: 9
[TAB]- Movement: 2
[TAB]- Invisible to most units
[TAB]- Can explore rival territory
[TAB]- 0-1 first strikes
[TAB]- -50% attack vs. mechanized infantry
[TAB]- -50% attack vs. armored units
[TAB]- Starts with sentry
[TAB]
Modern Sniper:
[TAB]- Requires: Assembly Line Technology and Sniper School
[TAB]- Cost: 210
[TAB]- Combat: 12
[TAB]- Movement: 2
[TAB]- Invisible to most units
[TAB]- Can explore rival territory
[TAB]- 1-2 first strikes
[TAB]- -25% attack vs. mechanized infantry
[TAB]- -25% attack vs. armored units
[TAB]- Starts with sentry and advanced sniper training


-----Buildings/Improvements-----
Spoiler :

Added:
- Sniper School:
[TAB]- Costs 140 hammers
[TAB]- Required to build Modern Snipers
[TAB]- Requires some barracks per Sniper School (changes for each difficulty
[TAB] level) and a barracks in the city
[TAB]- Sniper school will be lost if the city is conquered
[TAB]


-----Promotions/Traits-----
Spoiler :

Added:
- Line of Sight:
[TAB]- +1 Visibility Range
[TAB]- +1 Sniper Range
[TAB]- Given to sniper units on hills

- Advanced Sniper Training:
[TAB]- Can attack multiple times
[TAB]- Can use enemy roads
[TAB]- +1 Movement range
[TAB]- +25% Withdrawal chance
[TAB]- Available to sniper units

- Aim I:
[TAB]- +8% Shooting accuracy for sniper units
[TAB]- Available to sniper units

- Aim II:
[TAB]- +15% Shooting accuracy for sniper units
[TAB]- Available to sniper units

- Aim III:
[TAB]- +13% Shooting accuracy for sniper units
[TAB]- Available to sniper units

- Aim IV:
[TAB]- +10% Shooting accuracy for sniper units
[TAB]- Available to sniper units

- Aim V:
[TAB]- +8% Shooting accuracy for sniper units
[TAB]- Available to sniper units

- Fatal Shot I:
[TAB]- +12% Chance shot will be fatal
[TAB]- Available to sniper units

- Fatal Shot II:
[TAB]- +15% Chance shot will be fatal
[TAB]- Available to sniper units

- Fatal Shot III:
[TAB]- +7% Chance shot will be fatal
[TAB]- Available to sniper units

- Obfuscation I:
[TAB]- +12% Chance sniper won't be detected by enemy units
[TAB]- Available to sniper units

- Obfuscation II:
[TAB]- +15% Chance sniper won't be detected by enemy units
[TAB]- Available to sniper units

- Obfuscation III:
[TAB]- +9% Chance sniper won't be detected by enemy units
[TAB]- Available to sniper units



-----Notes to Modmakers-----

If you want to use the Sniper Mod in your mod I have tried to make things as
easy as possible for you. In the XML files modified sections are enclosed by
start and end tags.

In the Python files I have added # and # in
all of the places that I have made changes to the original files.

All I ask is that you give me credit.

-----Known Issues-----

- When selecting a unit that isn't the stack leader as a snipers target their
animation is not displayed when they are shot.

- When two snipers from the same civilization are in the same plot and one is
discovered then both snipers will be visible.


-----Version Information-----

-----v0.6.x-----

- Changed the name of the "Sniper" promotion to "Advanced Sniper Training" per
Jeckels suggestion.

- Fixed the bug reported by Jeckel in the SniperUtils.py file in the
getSniperTargets method, sniperUtils was used instead of self.

- Added the missing TXT_KEY_BUILDING_SNIPER_SCHOOL_STRATEGY tag. Reported by
Shqype.

- Fixed the issue causing the selection cursor to act "funny" when the world
builder screen was used, reported by Shqype.

- Added Kael's sample code to change the "or" promotion prerequisites to "and".

- Integrated Talchas Action Buttons v2.0 Mod

- Updated the SDK code to include in the promotion: aim, fatal shot chance and
obfuscation. These changes include showing the information correctly in the
civilopedia and in the game.

- Added the configurable option allowing for players to specify that a war is
initiated between the owner of the sniper and the snipers target when the
sniper shoots a the target.

Spoiler :

-----v0.5.x------

- Updated all of the python code and XML to be compatible with the v1.61 patch

- Consolidated all of the game text XML into one file.

- Fixed the bug reported by Aranor that prevented the firing of sniper shots at
selected targets.

- Added the code to reset the visibility of a plot for a sniper if they were
found the previous turn but were not killed and they did not move.

- Added the code to reset a snipers harass shots at the begining of their
owners turn.

- Started reorganizing code preparing for release

- Readded code to enable snipers to waste shots if the mod is configured to
allow them to waste shots.

- added the option allowing players to specify how many shots snipers can take
when their harassment action has been set.

- Finished adding comments to all appropriate code

- Prepared code for release by removing commented out code


-----v0.4------

- Added the code enabling the AI players in the game to use snipers. Beware
they do use the snipers and when they do score successful kills and can get
promotions they will select the best ones for their snipers. YOU HAVE BEEN
WARNED.

- Added obfuscation code. Sniper units can now be found by different units
depending on their experience level, and yes sniper units will tend to find
other sniper units a lot easier then regular units.

- Added code that will make it so terrain affects sniper obfuscation. I.e.
Sniper in a plot with trees = harder to find sniper.

- Fixed the issue addressed by talchas in his action buttons mod comp where
sometimes an exception is thrown when a action button ID number is used.


-----v0.3------

- Added the option allowing players to configure how many experience points
snipers get for each successful shot.

- Fixed bug reported by Aranor allowing players to continue shooting at targets
even if the sniper had run out of moves.

- Fixed bug reported by Aranor that would give sniper units extra promotions
even if they didn't deserve it.

- Removed the ability to kill off regular citizen specialists.

- Modified the terrorize citizens feature. When a sniper terrorizes a city all
of the citizens working plots will flee the plots they are working and go
into the city.

- Added code to correctly give sniper units their line of sight promotions when
they are created or built.


-----v0.2------

- Broke-up the event management code from the core sniper code.

- Created and added one more action image, the disabled take shot image. This
image will be displayed when snipers cannot use the take shot action.

- Added the option allowing players to specify if the sniper shooting and
visibility range should always be displayed or only when the take shot action
is turned on.

- Added death sounds when a sniper successfully kills a target in a city.

- Added the option allowing players to specify if all successful shots (fatal
and non-fatal) should give sniper units experience or if only fatal shots
should give units experience.

- Implemented fatal shot code that makes use of the fatal shot promotions. What
this means is that not every single shot sniper units fire are going to kill
the intended target.

- Added the option allowing players to include or exclude city targets as valid
targets for sniper units. Also added the options allowing players to
individually include or exclude the different types of citizens as valid
targets for sniper units. The different possible targets for sniper units in
cities are: units, specialists, super specialists (great people who joined
the city) and citizens. The last target "citizens" does not directly target
and kill off the population. Instead, it will allow your sniper units to
terrorize the citizen population and cause unrest.

- Added the option allowing players to specify if killing off specialists
reduces the population in a city or not.

- Added the options allowing players to specify the base sniper attributes:
aim, fatal shot and obfuscation.


-----v0.1------

- Setup Sniper Mod infrastructure leveraged some of it from Aranor's sniper mod

- Integrated Dr Elmer Jiggle's event manager and INI parsing code.

- Added "Line of Sight" promotion and option allowing players to enable or
disable the promotion. This change also includes the hiding or displaying of
the promotion in the civilopedia.

- Added Sniper promotion and unit combat type. The sniper unit combat type will
be used to distinguish snipers from regular units.

- Added the "Sniper School" building used to train modern snipers with custom
image for the button. Still need a custom model and skin for the actual in
game building.

- Added two sniper units, sniper and modern sniper. The modern sniper can only
be built in a city with a sniper school. Both are fully implemented including
their civilopedia entries.

- Finished adding the sniper promotions including civilopedia entries: Aim 1-5,
Obfuscation 1-3 and Fatal Shot 1-3.

- Added code to highlight the sniper shooting range and the sniper visibility
range. Also added five new player configurable INI options to support the
highlighting feature for snipers. These configurable options allow players to
set what sniper range highlighting should be displayed, what colors should be
used to display the highlighting and if snipers should be able to ignore
terrain features such as hills, peaks, forests, etc.

- Figured out how to programmatically trigger unit animations! Added test code
allowing the currently selected sniper to shot a unit. The damage done to
that "unit" depends on how many entities are in the unit. When the sniper
shoots its attack animation is triggered and the target unit entity death
animation is also triggered.


-----===Credits & Thanks===-----

- Exavier
[TAB]Composite Mod - readme.txt format

- TGA and 12monkeys
[TAB]For proving that plot highlighting isn't hard :)

- Bhruic, TGA, 12monkeys, Zuul and everyone else participating in the Revealing
Invisible Units thread - http://forums.civfanatics.com/showthread.php?p=3881063&posted=1#post3881063[TAB]

- Stone-D
[TAB]SD-Toolkit
[TAB]
- C.Roland
[TAB]For providing the wonderful sniper school model and skin
[TAB]
- korvgubben
[TAB]For providing a starting point for my sniper mod

- Aranor
[TAB]For providing a starting point for my sniper mod and extensively testing
[TAB]the mod from day one!!!
[TAB]
- Dr Elmer Jiggle
[TAB]For providing the INI file parser code allowing for players to
[TAB]customize this mod without having to touch the python code!!!

- Talchas
[TAB]For his Action Buttons v2.0 Mod

- Kael
[TAB]For providing the sample code needed to add new tags in the game schema
[TAB]and how to correctly read their values through the SDK.
[TAB][TAB]
- Testers
[TAB]Aranor, Kael, Jeckel, Killamike718, Shqype and Lord Olleus
Author
TheLopez
Downloads
535
Views
535
First release
Last update
Rating
4.00 star(s) 1 ratings

More resources from TheLopez

Latest reviews

awsome mod, thanks dude :)
Top Bottom