Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Secondary Objective 'Humanitarian Aid' #894

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

UselessFodder
Copy link

@UselessFodder UselessFodder commented Sep 14, 2021

Q A
Bug fix? no
New feature? yes
Needs wipe? no

Description:

Content:

  • civ_supplies.sqf
  • kp_liberation_config update
  • added notifications to remote_call_intel.sqf
  • added sections in stringtable.xml, secondary_ui.sqf, and liberation_notifications.hpp to support new notifications
  • [/] full localization (only Google translate at this time)

Successfully tested on:

  • Local MP
  • Dedicated MP

RaysTheLord and others added 4 commits August 5, 2021 16:41
This mission costs 5 intel by default, selects a random friendly town, and requests the players bring 2 supply crates to within 50m of the town center. Once the supplies are in place, it deletes those supply crates and rewards the player with +5% to civilian reputation (default).

The intel cost and % chance in civilian reputation are configurable in the kp_liberation_config. The mission will also detect if there are currently no friendly towns, display a notification, and refund the correct intel cost.
@UselessFodder
Copy link
Author

This is my first pull request, so I'm sorry if the formatting is off. Let me know what you guys think!

@UselessFodder
Copy link
Author

Just doing a ping to ask if anyone has had to check this commit out? I think it would be a good inclusion to the base game.

@MildlyInterested
Copy link

@UselessFodder I will check them out as soon as I figure out how to get this PR to show up on my fork.

@uniflare
Copy link

Works great, nice job, integrated into our live fork.
Never found the leader, and had to check the script for what exactly I had to do - maybe give details on what you need to do in the objective screen.
Other than that, really nice, would be great to get some more side missions :).

Copy link
Contributor

@ColinM9991 ColinM9991 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just pulled this mission and found an issue with the English localisation. Other than this, nice work.

Missionframework/stringtable.xml Outdated Show resolved Hide resolved
@UselessFodder
Copy link
Author

UselessFodder commented Oct 11, 2022 via email

peckcat added a commit to peckcat/PCAT-Liberation that referenced this pull request Feb 1, 2023
# Fix filename error.
 - "custom east.sqf" -> "custom_east.sqf"

# Remove build preset workshopid tag.

# Modify .gitignore

# Update stringtable.xml
 - Including this translation.
 - New Secondary Objective 'Humanitarian Aid'
 - KillahPotatoes#894

# bugfix infantry battlegroups
 - KillahPotatoes#846
Added a ' to line 7378 in stringtable.xml as per @ColinM9991's suggestion.
@NZF-JDWang
Copy link

Just one little thing, you have KP_liberation_civ_supplies_impact in the config which allows you to set the cvi rep gain, however the stringtable is hard coded to 5%, so if you change KP_liberation_civ_supplies_impact to say 20, the sidemission will still say 5%

Otherwise this is a great idea for a side mission <3

@UselessFodder
Copy link
Author

UselessFodder commented Feb 24, 2023 via email

@ColinM9991
Copy link
Contributor

ColinM9991 commented Feb 24, 2023

Thanks for the feedback! I'm not sure if there's a way to make that entry dynamic, but I will change it to just not say any percentage until I can figure it out

You could use format by popping a %1 in the stringtable text.

@UselessFodder
Copy link
Author

UselessFodder commented Feb 24, 2023 via email

Apricot-ale referenced this pull request in Apricot-ale/KP-Liberation-APR Feb 28, 2023
@UselessFodder
Copy link
Author

UselessFodder commented May 13, 2023

Thanks for the feedback! I'm not sure if there's a way to make that entry dynamic, but I will change it to just not say any percentage until I can figure it out

You could use format by popping a %1 in the stringtable text.

So, I spent some time looking at this recently and I'm not sure how to utilize format in this situation as the text goes through a localization and a parseText to display the values on the secondary mission UI. Here is the route:

This code calls for the _briefings text:

// In: \scripts\client\ui\secondary_ui.sqf Start Line 27

_briefings = [
    "STR_SECONDARY_BRIEFING0",
    "STR_SECONDARY_BRIEFING1",
    "STR_SECONDARY_BRIEFING2",
	"STR_SECONDARY_BRIEFING3"
];

....

while { dialog && alive player && dostartsecondary == 0 } do {

    if ( _oldchoice != lbCurSel 101 ) then {
        _oldchoice = lbCurSel 101;
        ctrlSetText [ 106, _images select _oldchoice ];
        ((findDisplay 6842) displayCtrl (102)) ctrlSetStructuredText parseText localize (_briefings select _oldchoice);
    };

This pulls the text from stringtable.xml here:

// In: \stringtable.xml Start Line 7377
<Key ID="STR_SECONDARY_BRIEFING3">
            <Original>&lt;t size='1.3' color='#ffa000'&gt;HUMANITARIAN AID&lt;/t&gt;&lt;br/&gt;&lt;br/&gt;&lt;t size='1'&gt;A nearby settlement has requested supplies, head out and deliver them to the highlighted settlement.&lt;/t&gt;&lt;br/&gt;&lt;br/&gt;&lt;t size='1'&gt;This will help win hearts and minds in the local region and ultimately help limit any locals engaging us in open and guerilla combat.&lt;/t&gt;&lt;br/&gt;&lt;br/&gt;&lt;t size='1.15' color='#00a0ff'&gt;Cost: 5&lt;img image='\A3\Ui_f\data\GUI\Cfg\Ranks\general_gs.paa'/&gt;&lt;/t&gt;&lt;br/&gt;&lt;t size='1.15' color='#ffa000'&gt;Reward: 5% increase in Civil Reputation.&lt;/t&gt;&lt;br/&gt;&lt;br/&gt;&lt;t size='10'&gt;&lt;img image='res\secondary\fob_obj.jpg'/&gt;&lt;/t&gt;</Original>
            <French>&lt;t size='1.3' color='#ffa000'&gt;RECHERCHE ET SAUVETAGE&lt;/t&gt;&lt;br/&gt;&lt;br/&gt;&lt;t size='1'&gt;Nous avons perdu le contact avec un helicoptère de reconnaissance en mission derrière les lignes ennemies. Il a probablement été abattu par les forces hostiles.&lt;/t&gt;&lt;br/&gt;&lt;br/&gt;&lt;t size='1'&gt;L'hélicopter a pu finir sa course dans une large zone autour de sa dernière position connue. Votre mission est de retrouver l'équipage et sa précieuse intel. Les forces hostiles les auront peut-être déjà retrouvés, votre action doit donc être rapide et décisive.&lt;/t&gt;&lt;br/&gt;&lt;br/&gt;&lt;t size='1.15' color='#00a0ff'&gt;Cout: 8&lt;img image='\A3\Ui_f\data\GUI\Cfg\Ranks\general_gs.paa'/&gt;&lt;/t&gt;&lt;br/&gt;&lt;t size='1.15' color='#ffa000'&gt;Récompense: 20 points d'intel (10 pour chaque équipage vivant).&lt;/t&gt;&lt;br/&gt;&lt;br/&gt;&lt;t size='10'&gt;&lt;img image='res\secondary\fob_obj.jpg'/&gt;&lt;/t&gt;</French>
            <German>......

This is the same format as the original secondary mission such as FOB_Hunt:

In: \stringtable.xml start line 3570
 ID="STR_SECONDARY_BRIEFING0">
            <Original>&lt;t size='1.3' color='#ffa000'&gt;FOB HUNTING&lt;/t&gt;&lt;br/&gt;&lt;br/&gt;&lt;t size='1'&gt;OPFOR forces use an array of small logistic bases situated behind the front lines. Destroying those assets would greatly disrupt the OPFOR supply lines and impair their capacity to react to our actions.&lt;/t&gt;&lt;br/&gt;&lt;br/&gt;&lt;t size='1'&gt;Your mission is to destroy all supply assets (trucks, containers) at the objective by any means at your disposal. Unfortunately our intelligence is not able to provide you with a precise position for the base, you will have to locate the objective in the red zone on your map.&lt;/t&gt;&lt;br/&gt;&lt;br/&gt;&lt;t size='1.15' color='#00a0ff'&gt;Cost: 15&lt;img image='\A3\Ui_f\data\GUI\Cfg\Ranks\general_gs.paa'/&gt;&lt;/t&gt;&lt;br/&gt;&lt;t size='1.15' color='#ffa000'&gt;**Reward: OPFOR alert level reduced by 40%**&lt;/t&gt;&lt;br/&gt;&lt;br/&gt;&lt;t size='10'&gt;&lt;img image='res\secondary\fob_obj.jpg'/&gt;&lt;/t&gt;</Original>

I can probably change the Secondary UI display for all of the missions to be in formatted text and pull the configuration values for each mission, but for now I think I am going to say that's a much bigger change than a simple secondary mission addition and leave the text to be the same format as the rest of the default missions. @ColinM9991 @NZF-JDWang

@mevoyairyendo
Copy link

How can I download it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants