Giter Club home page Giter Club logo

tesv-cobb-api's Introduction

tesv-cobb-api

CobbAPI: A script-extending resource for Skyrim Classic mod authors.

This DLL depends on the Shared Items Project I use for my reverse-engineered findings. If you were linked here in search of my reverse-engineered findings for Skyrim Classic, then you should go to that repo instead.

In order to get the CobbAPI solution and project to load properly, you will need to manually edit the files (current.sln and CobbBugFixes.vcxproj) and fix up the file paths for the shared project. Visual Studio 2015 will not allow you to do this through the GUI; it refuses to load anything that has incorrect paths, but also refuses to allow you to tell it where the missing files are. I apologize for the inconvenience; doing things this way will allow me to consolidate all of my reverse-engineered code so that I don't end up with multiple copies that have fallen out of synch, and it would be a perfectly viable approach were Visual Studio even a little less brittle.

SKSE source code and project files are not included.

The finished work is available for download from NexusMods.

tesv-cobb-api's People

Contributors

davidjcobb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

clayne rethesda

tesv-cobb-api's Issues

Rebuild UTF8 handling and sorting

The cobb::lowerstring class may be broken. I ran into problems with it when reusing it in the Outfit System and ended up having to rewrite my UTF8 code. We should backport that rewrite to CobbAPI.

Here's the SkyOutSys repo at this point in time: link. We copied over the Papyrus functions for sorting an array of strings, and sorting a pair of strings+forms (we still have that function templated under the hood).

Editor ID patch: change assembly to allow chaining

If I use this assembly in LoadMoreEditorIDs.cpp, then it should be possible for multiple DLLs to hook the editor ID setter on the same form types, provided all such DLLs use the same approach.

_asm {
   mov  eax, dword ptr [esp + 0x4];
   push eax; // protect
   push ecx; // protect
   push eax;
   push ecx;
   call Inner; // stdcall; pops its args for us
   pop  ecx; // restore
   pop  eax; // restore
   mov  dword ptr [esp + 0x4], eax; // set up tail call
   //
   // tail call to original function:
   //
   jmp  THE_ORIGINAL_FUNCTION_WHICH_I_HAVE_STORED_SOMEHOW;
}```

Couple questions about spawns/moves.

I want to see if I have this straight . . . I'm looking at CobbAPIBatchMoveGroup/Rel and CobbAPIBatchSpawnComplex

The descriptions start with the word "Move". Does this mean that the entities/objrefs must already exist in the cell, or are they spawned in as new?

CobbAPIBatchSpawnComplex says:

This Papyrus class allows you to group spawns into buckets called "sets."

Am I to understand that that a "set" of objrefs could be defined, then the "task" object would spawn them in, in a group, and potentially several sets in a batch?


Here's a smidge of backstory: Back a million years ago, there was a util for Half Life called "Rand Map". You could build a "theme" for Rand Map consisting of prebuilt geometry... rooms, halls, etc. Rand Map would then take your prebuilt geometry, and shuffle it together to create a completely randomized map. This was insanely fun to work with because of the quick turnaround from design to play.

I've been dreaming for years about such a thing for Skyrim... where I could build a bunch of prefab rooms/halls/sections, and then have the game completely randomize the contents of a cell to play.

I'm "ok" with papyrus (better with javascript/react ๐Ÿ˜), and i'm "decent" with map design, but never had any idea until now that it was even remotely possible using papyrus or even skse

So, my question is this:
I know there would need to be more to it, but I'm talking conceptually. . . Based on what I've described above, does it sound feasible to be able to design the shapes and bounds of room-like spaces, and then use your API here to use those prebuilt spaces to create randomized levels?

Either way, thanks for writing this tool.

TESForm::LoadForm and formIDs

Sorry, this seems to be the only way to add a comment to a line outside of a commit/pull request.

// form IDs rather than form pointers. I don't know when those form IDs are

FormIds stored in pointer fields during the TESForm::LoadForm() phase are resolved in the TESForm::InitItem() phase (referred to as TESForm::Link() in the xSE source). The member function is usually a couple of offsets below LoadForm(). At least, that's how it used to be in Oblivion.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.