Fallout Tactics utility FTSE - Fallout Tactics Scripting Engine (0.56a)

I made a couple of changes to the compiler setup in 0.45 - have you checked if it improved anything? If not, I'll get a proper error box when the DLL fails to load, so that I can see exactly why it's not working.

Thanks kindly. I'll make some tests then and tell if if something changed from here.
 
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.
 
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
 
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".
 
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?
 
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?
 
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!
 
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.)
 
Hi Melindil!

Some quick questions :

Does something like "world:SetMissionVar" exist? I would like to setup a campaign variable from the LUA code.

I also tried to write an overhead message above player and it didn't work
Code:
p = world:GetPlayer()
p:DisplayMessage("<Cy>I should probably move out soon.")
but it crashes the game. What I am doing wrong here?

Needless to say, when you'll publish some new documentation on the wiki, I'll be a bit less confuse I can tell you :P

Besides that, as for an update, I'll be shutting down Mac version of my mod forever I think. Results dramatically changes from one OSX version to another (most does not work), Newest OSX completely wiped out 32 bits applications (guess WINE will die eventually), and I noticed strange behaviour of having from time to time most of the tiles not showing up at all. I guess there is finally nothing to do with a Mac's computer after all... :P Lol.
 
Last edited:
This tool is amazing.
Have been modding this game on and off for many years, and was wondering if it would be possible to override certain entity parameters through this scripting engine.
For example, some settings on weapon entities such as "Spread (Arc)", "DefaultBaseDamage", "Damage Radius","Maximum Range", "Minimum and Maximum damage" (individually rather than as a whole) to be modified according to the ammunition variant used; rather than be defined by the weapon.
This would be useful for shotguns to fire different types of ammo like buckshot, slugs, or explosive rounds.
As it is, I have gotten around by adding different fire modes you select according to the ammo loaded, but this is rather awkward, and doesn't work for NPCs. It would be nice for the game to automatically use the "Cone" spread, when firing buckshot and the "Straight" when firing slugs; not to mention apply modifiers to its range, and individually change minimum and maximum damage (ie. buckshot decreases Maximum range and damages by x percent, or slugs increase it; explosive rounds add a damage radius. etc.)
It would be also nice if the damage done by any explosion was different from that done by the kinetic damage of the projectile, and allowed you to deal more than one type of base damage (normal, energy, fire, etc.)
Take rocket launchers for example; any target hit directly by the rocket, would sustain the full kinetic impact of the projectile, plus the damage of the explosion. Targets within the blast radius, would only get hit by the shockwave, and fragments (if any) depending on the ammo used. HEAT rounds would have very small blast radius as they are shaped charges, but deal more damage to the target; HE rounds on the other hand, would have a much larger blast radius, but the explosion would do less damage.
Anyway, these are just some of my ideas to improve the way weapons are represented in the game.
There are more things I could think of, but will leave it at this for the time being.

Cheers!
 
Last edited:
Is it possible to get a version of this that doesn't require .NET or mono. I'm running on wine with Exagear RPG and its been a bi@tc# to get that to work...
 
Hi!

Another feature that could be awsome to add to the list... The "variable remote control". Clearly, one can use a detonator ingame to send some number id and start an explosion. Any detonator will work doing so.

What if a detonator code could be catch by the LUA code and flag a variable? That will make the detonator be a remote control to enable many many great functionalities...
 
Back
Top