Jump to content

Search the Community

Showing results for tags 'pascal'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Nexus Mods Hub
    • Site Updates
    • Site Support
    • Account Support
    • Vortex Support
    • Nexus Mods App
  • Modding Discussion
    • Mod Troubleshooting
    • Mod Ideas
    • Modding Academy
    • Articles and Guides
  • The Lounge
    • Newbies
    • General Chat
    • Gaming
    • Hardware and software discussion
    • Off-Topic
  • Moderation
    • Formal Warnings and Bans
  • Discussions
  • Vortex
  • Cyberpunk 2077's Mod Ideas
  • Cyberpunk 2077's Discussion
  • Baldur's Gate 3's Discussion
  • Baldur's Gate 3's Mod Ideas
  • Blade & Sorcery's Discussion
  • Blade & Sorcery's Blade & Sorcery: Nomad
  • Elden Ring's Discussion
  • Elden Ring's Mod Ideas
  • Fallout 4's Discussion
  • Fallout 4's Mod Ideas
  • Fallout 4's Creation Kit and Modders
  • Skyrim's Skyrim SE
  • Skyrim's Skyrim LE
  • Skyrim's Skyrim VR and Consoles
  • Skyrim's Mod Ideas
  • Skyrim's Creation Kit and Modders
  • Monster Hunter's MH Rise
  • Monster Hunter's MH World
  • Morrowind's Discussion
  • Morrowind's Spoilers
  • Morrowind's Lore
  • Morrowind's Construction Set and Modders
  • Morrowind's Troubleshooting
  • Mount & Blade II: Bannerlord's Discussion
  • Mount & Blade II: Bannerlord's Old Games
  • Oblivion's Discussion
  • Oblivion's Mod Ideas
  • Oblivion's Mod troubleshooting
  • Oblivion's Oblivion Construction Set and Modders
  • Oblivion's Spoilers
  • Ready or Not's Discussion
  • Red Dead Redemption 2's Discussion
  • Red Dead Redemption 2's Mod Ideas
  • Resident Evil Remakes's Resident Evil 4
  • Resident Evil Remakes's Resident Evil 3
  • Resident Evil Remakes's Resident Evil 2
  • Resident Evil Remakes's Resident Evil Village
  • Starfield's Discussion
  • Starfield's Mod Ideas
  • Starfield's Creation Kit and Modders
  • The Witcher's The Witcher 3: Wild Hunt
  • The Witcher's Mod Ideas
  • The Witcher's The Witcher 2: Assassins of Kings
  • The Witcher's The Witcher
  • The Witcher's REDEngine and Modders
  • Spider-Man's Spider-Man Remastered
  • Spider-Man's Miles Morales
  • Spider-Man's Mod Ideas
  • Fallout New Vegas's Discussion
  • Fallout New Vegas's Mod Ideas
  • Fallout New Vegas's Mod Troubleshooting
  • Fallout New Vegas's GECK and Modders
  • Fallout New Vegas's Spoilers
  • Stardew Valley's Discussion
  • Fallout 3's Mod Ideas
  • Fallout 3's Discussion
  • Fallout 3's GECK and Modders
  • Fallout 3's Spoilers
  • Fallout 3's Mod Troubleshooting
  • Dragon Age: Origins's Discussion
  • Dragon Age: Origins's Builder Troubleshooting
  • Dragon Age: Origins's Mod Troubleshooting
  • Dragon Age: Origins's Mod Ideas
  • Valheim's Discussion
  • Dark Souls's Dark Souls
  • Dark Souls's Dark Souls 2
  • Dark Souls's Dark Souls 3
  • Dark Souls's Dark Souls Remastered
  • Mass Effect's Legendary Edition
  • Mass Effect's Original Trilogy
  • Mass Effect's Andromeda
  • Hogwarts Legacy's Discussion
  • Subnautica's Subnautica
  • Subnautica's Below Zero
  • XCOM's Discussion
  • XCOM's Mod Ideas
  • XCOM's Enemy Unknown
  • XCOM's XCOM 2
  • Jurassic World Evolution's Jurassic World Evolution 2
  • Jurassic World Evolution's Jurassic World Evolution
  • 7 Days To Die's Discussion
  • Anno 1800's Discussion
  • Assassin's Creed's Odyssey
  • Assassin's Creed's Valhalla
  • Fallout 76's Discussion
  • Fallout 76's Mod Ideas
  • Far Cry's Far Cry 3
  • Far Cry's Discussion
  • Final Fantasy's Discussion
  • Final Fantasy's VII Remake
  • Final Fantasy's XII The Zodiac Age
  • BattleTech's Discussion
  • Dying Light's Dying Light
  • Dying Light's Dying Light 2
  • Dragon's Dogma: Dark Arisen's Discussion
  • Dragon's Dogma: Dark Arisen's Mod Ideas
  • Dragon Age: Inquisition's Discussion
  • Dragon Age: Inquisition's Mod Ideas
  • Dragon Age: Inquisition's Troubleshooting
  • No Man's Sky's Discussion
  • No Man's Sky's Mod Ideas
  • The Elder Scrolls Online's Discussion
  • State of Decay's State of Decay
  • State of Decay's State of Decay 2
  • Planet Zoo's Discussion
  • Neverwinter Nights's NWN Discussion
  • Neverwinter Nights's NWN2 Discussion
  • Neverwinter Nights's Mod Ideas
  • My Summer Car's Discussion
  • Metal Gear Solid V: The Phantom Pain's Discussion
  • MechWarrior 5: Mercenaries's Discussion
  • Kingdom Come: Deliverance's Discussion
  • Kingdom Come: Deliverance's Modding Tools and Modders
  • Devil May Cry 5's Discussion
  • Star Wars Jedi's Fallen Order
  • Star Wars Jedi's Survivor
  • Star Wars: Battlefront II (2017)'s Discussion
  • Sekiro: Shadows Die Twice's Discussion
  • Pillars of Eternity's Pillars of Eternity
  • Pillars of Eternity's Pillars of Eternity 2: Deadfire
  • Palworld's Mod Ideas
  • Palworld's Discussion
  • Palworld's Unreal Engine and Modders
  • Dragon's Dogma 2's Discussion
  • Dragon's Dogma 2's Mod Ideas

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 4 results

  1. One thing I've noticed, is that there isn't much in the way of nice, easy to understand, and commented scripts for FO4Edit, which presents quite a big wall to lads who've never touched Pascal before. So what I've decided to do, is go through all of my scripts and add comments to them. So far, I've done four or five, and I'd like ta get the opinions of people who have never touched the stuff before. Some proper opinions 'n' criticism 'n' such. A super small & simple script with comments can be seen 'ere. And a relatively complex one here. Some feedback on stuff that still confuses ya 'n' such would be most welcome.
  2. Hi, I was thinking of making a patch for Dragonborn Ascendent and a draugr overhaul I've been looking to play. For context, Drabonborn Ascendent buffs certain shouts in the game. It gives the vanilla draugr that use some of these shouts their own unique one since using the buffed shouts would be op (such as removing the level cap on disarm, seriously). Problem is though the draugr mod I have in mind has a whopping 253 npcs! That's obviously quite a few records to sort through by hand. So then I thought: why not make an xEdit script that can do this? Problem is, I've never looked into it before. I decided to look at my file for the spawn removal tool. Fortunately, I was able to open it in notepad++. Sadly though, its written in Pascal, a language I'm not familiar with (I mostly only have certificates in web development languages, the only 'programming' languages I know are python and c++, python being what I mostly work in). It looks nothing like what I'm used to, but scanning over it I think I'm starting to make sense of the code, even though I don't know what half its commands do. Doing so though, I realized that this specific file may not help me much. I need a program that can CHANGE records to something else (such as the newly added draugr shouts), while the spawn removal tool only removes them! Because of that, it doesn't contain a command I would need to do such. The command it uses to remove stuff from leveled lists is just a deletion command, which will clearly do me no good. I at least need something that lets me ADD actor effects to npcs. What I need wouldn't be too fancy. Simply, it would iterate over all the npc entries in a mod. Every time it finds an npc with either the frost breath or disarm shouts, it replaces those with the corresponding 'draugr' shouts from Dragonborn Ascendent. I would do it myself, but I don't know pascal, and scanning over the files I do have I don't see a command I could use to change actor effects. Honestly, if someone could tell me how to make this, it would be appreciated as much if not more as doing it for me. And yes, I even thought about trying to do this with SPID. Sadly, it seems to have no way to select npcs by the spells they already have. Fml...
  3. I'm actually trying to merge the shell texturing of a cloth (which have fur, but is low-poly) and a high-poly cloth with NifSkope I know i can use TES5edit scripts to "mass edit" (batch process) meshes, so i was wondering if i could code something that copy it automatically. Basically i need to copy these Fur.00x branches and paste in the "Scene Root" of another NIF with the same name but in another folder Next image is the highpoly mentioned before No need to be a complicated code, i can figure out how to code it but i need somone to explain me the part to copy a specific branch inside scene root to another file
  4. I'm having a hard time getting a script together that will both compile in Delphi's Starter IDE and run in FO4Edit. It's typically one or the other, due to enums. For example, I can operate on DefType or ElementType returns, and have created a script that runs correctly, but it raises compile errors in IDE, which makes it difficult to check other syntax errors I may be making while trying to learn the language. That's a general problem I'm having. (But maybe I can add 'wbDefinitionsFO4' from source to uses to compile, then remove? Idk.) Now I have a script which doesn't (yet) utilize those type returns and which does compile correctly but raises "Class declaration expected but '(' found", due to my apparently otherwise seemingly correct implementation of my own enumeration type, based off Delphi's online and TES5Edit's source examples. The TES5 Scripting Functions Wiki notes that the 'type' keyword is unsupported but it can be used to "alias a class name" (whatever that means). I don't know how to define this enumeration otherwise, or if I'm even allowed to use it within the confines of the API. (It's all magic and a bunch of := and ; but not += to me. Yeesh.) Anyway, I'm trying to write a script that will write a collection of records to json(s). In order to do that, I first want to remove the numbering from things like 'Value #1' and otherwise put elements that are described as arrays (in 'wbDefinitionsFO4') into arrays (because ElementType doesn't tell the whole story in that regard). This entails pre-compiling lists (or delimited strings) of Names for each record type to search against as I cycle through the container(s) in order to format the json correctly. To do the search, I thought I'd grab the signature of the record and run it through a case statement, so I know which particular strings to search for. Can't do that for strings, and I don't want to write a bunch of if else statements if I can help it. So I figured I'd change to signature to its unique integer and run it through a case of similarly pre-determined signature enum integers and fork from there. Smart? Idk.(A timeit test in Python showed that, even with conversion cost, 'int in [ints]' was 2x+ faster than 'string in [strings]'. Python doesn't have cases, and from the Wiki, Edits scripts don't support 'in'. Yeesh.) I can't get my script to run in Editor, let alone set up some bench comparisons. (It did work before I added the enum/case stuff, and output in same format as an xDump, since my Write functions are adapted directly from it.) Rant over. Code with snipped enum below. Any insight/guidance would be appreciated. Thanks! unit myEditScript; interface uses xEditAPI, Classes, SysUtils, StrUtils, Windows, Math; type TSig = ( _AACT = 65656784, _NPC_ = 78806795 ); // Global variables var List : TStringList; var aIndent : string; procedure WriteElement(e : IInterface; aIndent: string = ''); procedure WriteContainer(e : IInterface; aIndent: string = ''); function RemoveNumbering(str : string): string; function SigToTSig(SigStr: string): TSig; function SigSwitch(Sig: TSig): integer; implementation function RemoveNumbering(str : string): string; var i : integer; begin Result := ''; i := Pos(' #', str); if (i = 0) then Result := str else Result := copy(str, 1, i-1); end; //idk if this works yet, different than my Python test function function SigToTSig(SigStr: string): TSig; var i, ch, e, Sig : integer; begin e := 3; for i := 1 to 4 do ch := ord(SigStr[i]); Sig := Sig + Round(ch*IntPower(100,e)); e := e - 1; Result := TSig(Sig); end; function SigSwitch(Sig: TSig): integer; begin Result :=0; Case Sig of _NPC_: Result:=1; End; end; procedure WriteContainer(e : IInterface; aIndent: string = ''); var i : Integer; begin for i := 0 to Pred(ElementCount(e)) do WriteElement(ElementByIndex(e, i), aIndent); end; procedure WriteElement(e : IInterface; aIndent: string = ''); var Name : string; Value : string; Str : string; defTypeStr : string; eleTypeStr : string; SigStr : string; begin Name := ShortName(e); Value := GetEditValue(e); SigStr := Signature(e); //first if just a test to see if it will catch if (SigSwitch(SigToTSig(SigStr)) = 1) then List.Add('Match'); if (Name <> 'Unused') then begin if (Name <> '')then Str := aIndent + RemoveNumbering(Name); if (Name <> '') or (Value <> '') then aIndent := aIndent + ' '; if (Value <> '') then begin Str := Str +': ' + Value; List.Add(Str) end else begin if (Name <> '') then List.Add(Str) end; end; WriteContainer(e, aIndent); end; // Called when the script starts function Initialize : integer; begin List := TStringList.Create; end; // Called for each selected record in the TES5Edit tree // If an entire plugin is selected then all records in the plugin will be processed function Process(e : IInterface) : integer; begin aIndent := ''; WriteContainer(e, aIndent); end; // Called after the script has finished processing every record function Finalize : integer; var filename : string; begin filename := ProgramPath + 'Edit Scripts\Test.txt'; AddMessage('Saving to ' + filename); List.SaveToFile(filename); List.Free; end; end.
×
×
  • Create New...
  翻译: