Does the Sniper fix actually fixes the perk as how it's supposed to be functioning? I've done some testings, but it doesn't seem to grant the user with Luck X 10 chance to critical hit.
Yes - confirmed through code analysis and testing. One thing that isn't mentioned or documented elsewhere, is that the weapon being used must have a "long" type of range (either Long or Scoped) on the firing mode as defined in the entity editor. Weapons I know qualify are: * Hunting and Sniper rifles * Laser rifle * Gauss rifle Weapons I've seen with long-ish range, but which don't qualify, are: * All of the mini guns (including laser and gauss) * Browning M2 * Enfield and FN Fal As the check for mode type looked intentional, I left it in when adding the patch to FTSE. If there's a lot of requests to change, I can add a second patch that opens up Sniper perk for "short" ranged weapons also.
So you knew that in order to utilize Sniper perk, one must wield a weapon with proper Range Class. You knew that, but decided not to mention anywhere. You decided to keep that as a secret that only you know. Then, later when you're making a fix for Sniper perk, again, you decided not to mention anywhere that only a weapon with proper Range Class would be affected by this perk, so that people who downloaded your fix and hoping that Sniper perk would be fixed and work as how it has been in past 2 Fallout games would be hit in the back of their heads by the fact; "Oh by the way, only certain weapons will work with Sniper perk." What really makes me uncomfortable is the fact that you've known this 'apparently intended feature' all along, and decided to keep it unchanged while you're making your own patch, but while doing so, you also decided to NOT mention it. Like... why? Why did you think that would be a good idea to NOT inform anyone who download your patch that only a certain weapon will work with the perk? Did you conveniently believe that people would know "Oh, this Sniper perk must only work with certain weapons, not all ranged weapons like how it's been in past two games." ? But that's enough of that. Yes, you should definitely apply the effect of Sniper perk to ANY ranged weapons, including the ones with 'Short' Range Class. The perk description says "(...) any successful hit in combat with a ranged weapon (...)" - It doesn't specifically says "some of the ranged weapons" You should also add this info; only certain weapons will be affected by Sniper perk - in the setup file as well. It's an information that everyone who downloads your patch should know. It should be informed, and should not be kept as a secret that only certain individual knows.
Hello, A simple question: what would be the exact line of code or function to get the value of a specific in-game campaign variable and compare it to a specific string, like "oui"? I just realized I badly programmed my script and lost some of my functions in the process. Thanks in advance. Hugo
There are a couple of ways. To detect as a trigger when the variable is set, you can use OnVariableChanged: Code: function OnVariableChanged(key,value,campaign) -- Check if our variable is set to the value we want if key == "YourKeyName" and value == "Oui" then -- Add code to execute here end end If calling from within another trigger (like OnLongTick), you can use world:GetMissionVar or world:GetCampaignVar, like: Code: -- inside some other function code, e.g. OnLongTick if world:GetMissionVar("MyKeyName") == "Oui" then -- add code here end
Superb thanks! I was looking for the second option in fact, as I used the first condition thinking it would work "within itself".
Okay... I have some trouble to make it works and I don't know why. Here is my code : Code: if key=="Premier_CANNIBALE" and value == "oui" then p = world:GetPlayer() if p:GetAttribute("masterThief", ACTOR_TABLE_CURRENT) == 0 then p:SetAttribute("masterThief", ACTOR_TABLE_PERM, 1) logger:log(p["name"] .. " hulkSmash expired") p:DisplayMessage("Normal") if world:GetMissionVar("Francais") == "non" then world:CombatLog(COMBATLOG_FEW, "<Cr>" .. p["name"] .. " has eaten human flesh. A note have been added in his.her bio.<C->") else world:CombatLog(COMBATLOG_FEW, "<Cr>" .. p["name"] .. " s'est nourri.e de chair humaine. Une note a été ajoutée dans sa bio.<C->") end end end I just added these two lines from your experiments with "Hulk Smash!" perk to see if I could get some results from them. But nothing happened. Code: logger:log(p["name"] .. " hulkSmash expired") p:DisplayMessage("Normal") In my example, The Campaign variable "Premier_CANNIBALE" is checked, it then successfully apply the perk, but no message are displayed in the combat log, nor above the caracter. I must say that "Francais" is also a Campaign variable. I entered it correctly? Did I miss something there? I tried setting up my messages to "Few" and also "All".
I think this one was my fault. In version 0.45, I removed the auto-constructed "name" field from the Lua objects for FOT entities, and replaced it with a GetName() function (getting the name is a surprisingly expensive operation, so doing that for every entity automatically hurt game performance). So, for example: Code: p["name"] Would change to: Code: p:GetName() I hope to keep these kinds of API changes to a minimum. Since most of the entity types are done now, at least as far as being able to get attributes, there shouldn't be any breaking changes like this in the future. I also see that I need to fix the Lua error reporting - this case should have printed an error to the FTSE log, but didn't. I'll check that too.
Oh no worries at all, I'm happy you found something. I was starting to feel a bit dumb to not get any results from it ha. I guess there is no harm in learning some loop holes and correcting them. I'm repairing my computer these next days, but I will test it afterwards and get back to you. Do I miss something or there is still no function and attributes list available somewhere?
There is, on the wiki, but it's still very incomplete. And this was partially intentional, since I expected a lot of changes while implementing the other entity types. Now that the interface is hopefully more stable, I'll be adding docs for everything that's currently available, once 0.50 is out the door (there's only a couple things left before release - the most fun one being the ability to add and remove entities via script).
Great! I'll take the occasion to release a "secret" 1.5.5 version of my mod with it and some tests. What is the wiki link?
Wiki link is: https://github.com/melindil/FTSE/wiki I'm going to update the to-do list there, since it's a little bit out-of-date.
Thanks! I am happy this exists! While I'm at it, I would like to suggest two "minor" patches, if you find them relevant of course : In the vanilla game, there are three kinds of Pipboy (Pip button on the main bar) : normal (showing local quests), bunker (showing breifings) and random encounter (showing nothing). I would like a way to make use of that "blank", worthless Pipboy in random map and allow two patches to either show local quests there (I know local quests still exist there) or Breifings. Game would be more consistent in my view of things.
You'll be happy to know, Melindil, that I tested a Wine version of Tactics with FTSE and it works flawlessly. I still need to make tests to it, but clearly the font colors are there, the custom perks are being applied, it looks stable, and it do looks good! Thanks!
That's good to hear. The default settings on Visual Studio were enabling nearly all CPU features, which may not have been fully supported on Wine. (They wouldn't help all that much for what FTSE does, especially since the BOS executable forces it to run in 32-bit mode anyway.)