Skip to content

add completion popups for new json functions - #2

Merged
CromFr merged 3 commits into
CromFr:masterfrom
teigrgwyn:patch-1
Oct 29, 2021
Merged

CromFr merged 3 commits into
CromFr:masterfrom
teigrgwyn:patch-1

Conversation

@teigrgwyn

Copy link
Copy Markdown
Contributor

No description provided.

@CromFr

CromFr commented Oct 17, 2021 •

Copy link
Copy Markdown
Owner

Hi !
Thank you for your PR !
I didn't know functions could return Jason data? Is it a new feature of nwn1:ee?

Also the jsson addition should be before the struct (struct is a bit special because we need to match the struct keyword followed by a struct name)

Like so:

    nwn_types = r'(void|string|int|float|object|vector|location|effect|event|talent|itemproperty|action|json|struct\s+\w+)'

@teigrgwyn

teigrgwyn commented Oct 28, 2021 •

Copy link
Copy Markdown
Contributor Author

there ya go -- didn't realize exactly what the \s+\w+ were

yes it's a great new feature from the lovely Beamdog, the json type supports all the native types of nwscript, but can also do everything json can normally do like create json objects, arrays, get the list of keys, etc; we can import json from a template too and make .gff edits to things like .utf creature files from directly within nwscript, and then spawn the creature in with the designated changes! really wonderful

your project is quite literally perfect for autocompletions and hint popups, and works spendidly on the new ST4 :)
image

@CromFr

CromFr commented Oct 29, 2021

Copy link
Copy Markdown
Owner

I wish we had the same json type in NWN2 :(

Thank you for your PR ! I'm glad to see some NWN1 people use my plugin, given it was originally written for NWN2

@CromFr
CromFr merged commit 0dda2f2 into CromFr:master Oct 29, 2021
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.

2 participants